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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;

public class Round232 {


	public static void main(String[] arg) throws IOException{
		Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
		
        
        int n;
        long Vn, Un, Upper,down, tmp;
        for (int i = 1; i <= m; i++){
        	n = sc.nextInt();

        	Vn = prevPrime(n);
        	Un = nextPrime(n);        
        	Upper = Vn*Un - 2*Un+2*(n-Vn+1);
        	down = 2*Vn*Un;        
        	tmp = gcd(Upper, down);


        	System.out.println(Upper/tmp+"/"+down/tmp);
        }
        sc.close();
	}



	private static long nextPrime(int n) {
		for (int i = n+1; i <= n+300; i++){
			if (isPrime(i))
				return i;
		}
		return -1;
	}



	private static long prevPrime(int n) {
		for (int i = n; i >= 2; i--)
			if (isPrime(i))
	            return i;
		
		return -1;
	}



	private static boolean isPrime(int n) {
		 for (int i = 2; i*i <= n; i++)
		        if (n%i==0) 
		        	return false;
		  return true;
	}
	
	private static long gcd(long number1, long number2){		
		
		while (number1%number2 != 0){
			long resto = number1%number2;
			number1 = number2;
			number2 = resto;
		}
		return number2;
	}

}