Gunnar is quite an old and forgetful researcher. Right now he is writing a paper on security in social networks and it actually involves some combinatorics. He wrote a program for calculating binomial coefficients to help him check some of his calculations.
A binomial coefficient is a number
where
Gunnar used his program to calculate
Input Specification
On the first line a positive integer: the number of test cases, at most
After that, per test case: one line with an integer
Output Specification
Per test case:
- one line with an integer: the number of ways of expressing
as a binomial coefficient. - one line with all pairs
that satisfy . Order them in increasing order of and, in case of a tie, order them in increasing order of . Format them as in the sample output.
Sample Input
2
2
15
Sample Output
1
(2,1)
4
(6,2) (6,4) (15,1) (15,14)
Comments