Little Petya likes numbers a lot. He found that number 123 in base 16 consists of two digits: the first is 7 and the second is 11. So the sum of digits of 123 in base 16 is equal to 18.

Now he wonders what is an average value of sum of digits of the number A written in all bases from 2 to A - 1.

Note that all computations should be done in base 10. You should find the result as an irreducible fraction, written in base 10.

Input

Input contains one integer number A (3 ≤ A ≤ 1000).

Output

Output should contain required average value in format «X/Y», where X is the numerator and Y is the denominator.

Examples

Input

5


Output

7/3


Input

3


Output

2/1

Note

In the first sample number 5 written in all bases from 2 to 4 looks so: 101, 12, 11. Sums of digits are 2, 3 and 2, respectively.
import java.io.*;


public class Main {

        static BufferedReader input;
        static PrintWriter output;
        static StreamTokenizer in;
        
        public static void main(String[] args) throws IOException {
        	input = new BufferedReader(new InputStreamReader(System.in));
 //        	input = new BufferedReader(new FileReader("input.txt"));
            output = new PrintWriter(System.out);
            int A = nextInt();
            int sum = 0;
            for (int i=2; i<A; i++){
            	sum += func(A, i);
            }
            A = A-2;
            int nod = NOD(A, sum);
            output.write(String.valueOf(sum/nod)+'/'+String.valueOf(A/nod));
            output.flush();
        }

        
    private static int NOD(int a, int b) {
			
    		if (a==0){
				return b;
			}
			else{
			return NOD(b%a, a);
			}
		}


	private static int func(int A, int i) {
    		int sum = 0;
			while (A>=i) {
				sum += A%i;
				A = A/i;
			};
			sum += A;
			return sum;
		}


	static String nextString() throws IOException {
        if ( in == null ) {
            in = new StreamTokenizer(input);
        }
        in.nextToken();
        return in.sval;
    }


    static double nextDouble() throws NumberFormatException, IOException {
        if ( in == null ) {
            in = new StreamTokenizer(input);
        }
        in.nextToken();
        return in.nval;
    }

    
    static int nextInt() throws NumberFormatException, IOException {
        return (int) nextDouble();
    }
    
    
    static long nextLong() throws NumberFormatException, IOException {
        return (long) nextDouble();
    }
    
 
    static void write(String st) {
                output.write(st);
    }

    
    static void writeln(String st) {
                output.write(st + "\n");
    }
    
}