3311.On Sum of Fractions

Time Limit: 1s Memory Limit: 256MB

Let's assume that
v(n) is the largest prime number, that does not exceed n; u(n) is the smallest prime number strictly greater than n.
Find 3311_1.png.

Input Format(From the terminal/stdin)

The first line contains integer t(1 \le t \le 500) - the number of testscases.

Each of the following t lines of the input contains integer n (2 \le n \le 109).

Output Format(To the terminal/stdout)

Print t lines: the i-th of them must contain the answer to the i-th test as an irreducible fraction "p/q", where p,q are integers, q \gt 0.

Sample Input

Copy
2
2
3
 \n
 \n
 \n

Sample Output

Copy
1/6
7/30
   \n
    \n

Submit

请先 登录

© 2025 FAQs