Travel#3236

Travel

1 second
64 megabytes
Medium

In a country there are cities, numbered from to . The traveler is initially in city and wants to visit all the cities. We know that he acts according to the following algorithm: first, an integer is randomly chosen in the interval [1, n - 1]. After that, cities are visited in the order of 1,\ 1 + m \bmod n,\ 1 + (2 \cdot m) \bmod n,\ \ldots and so on, until it gets to an already visited city. Note that this process will always be finite, since the set of cities is finite. Find the probability that the traveler will visit all the cities of the country.

Input

The first line of the input file contains the number of test cases, (1 \leq t \leq 10000). Each test consists of one line containing the number (2 \leq n \leq 2 \cdot 10^9).

Output

For each test case output the answer to the problem as an irreducible fraction.

Examples

Example 1

Loading
Loading