PRA8: The Laziest of them All // Advanced

 
Simon is a very lazy boy, who always sleeps in his Math class. One day his teacher catches him sleeping and tells him that she will fail him unless he can prove himself to her by answering her question. If Simon can answer it correctly, she will forgive him.

The problem: The teacher gives Simon a number N and asks him to find out the probability that any proper divisor of N would be an even perfect square.

Note: Even perfect square means the number should be even and a perfect square.

Input Format

The first line of input contains an integer T, the number of test cases. T lines follow, each line containing N, the number that the teacher provides.

Sample Input

2
2
8

Output Format

For each test case, print in a new line the output in p/q format where p and q are positive coprime integers. If p is 0, you should simply output 0.

Sample Output

0
1/3




You must be logged in to submit a solution.