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 <image>.

Input

The first line contains integer t (1 ≤ t ≤ 500) — the number of testscases. 

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

Output

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 > 0.

Examples

Input

2
2
3


Output

1/6
7/30
//package codeforces;

import java.io.PrintWriter;
import java.util.Scanner;


public class OnSumofFractions {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int t = in.nextInt();
        
        while (t-- > 0) {
            long n = in.nextLong();
            long vn = v(n),
                 un = u(n);
            
            long num = vn*un + 2*n - 2*(un + vn) + 2; // numerator
            long den = 2 * un * vn; // denominator
            long gcd = gcd(num, den); 
            num /= gcd;
            den /= gcd;
            out.println(num + "/" + den);
        }
        
        out.flush();
    }
    
    private static boolean isPrime(long x) {
        if (x < 2) return false;
        if (x == 2) return true;
        long max = (long) Math.sqrt(x);
        for (long i = 2; i <= max; i++)
            if (x % i == 0) return false;
        return true;
    }
    
    private static long v(long n) {
        while(!isPrime(n)) n--;
        return n;
    }
    
    private static long u(long n) {        
        while(!isPrime(++n));
        return n;
    }
    
    private static long gcd(long x, long y) {
        while (x > 0 && y > 0) {
            if (x < y) y %= x;
            else x %= y;
        }
        return x + y;
    }

}
