One day Mostafiz and Evan were talking about Pythagoras. Mostafiz told that Pythagorean Triplet is very much interesting. Hearing that, Evan told that he knew everything about Pythagorean Triplet. But, Actually, Evan doesn’t know anything about it.
Then, Mostafiz gives an easy problem to solve. But, Evan can’t solve it. Can you solve the problem?
The problem was:
All we know about Pythagorean Triplet - .Mostafiz gives an integer . You have to find all the triplets where:
; where , and all are positive integers.
of , and must be greater than . .
is fixed and
Example: If , Triplets are:
, where all triplets maintain , has greater than , is fixed and .
Each test contains multiple test cases. The first line contains a single integer the number of test cases.
Each test case contains a single integer .
For each test case, print one integer which is the number of triplets that follow all the conditions.
Next lines, print three integers , and in the increasing order of that follows the conditions.
Input | Output |
---|---|
2 6 12 | 1 6 8 10 2 12 9 15 12 16 20 |