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.util.Scanner;

public class Solution16 {
	static boolean isPrime(int n){
		for(int i = 2; i <= Math.sqrt(n); i++){
			if(n%i == 0){
				return false;
			}
		}
		return true;
	}
	
	static long gcd(long a, long b){
		if(b == 0) 
			return a; 
		else
			return gcd(b,a%b);
	}
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		for(long t = 0; t < T; t++){
			int n = sc.nextInt();
			int a = n;
			while(!isPrime(a)){
				a--;
			}
			int b = n+1;
			while(!isPrime(b)){
				b++;
			}
			long aa = a;
			long bb = b;
			long p = aa*bb - 2*bb + 2*(n-aa+1);
			long q = 2*aa*bb;
			long g= gcd(p,q);
			p/=g; q/=g;
			System.out.println(p + "/" + q);
		}
	}
}