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.util.*;
import java.io.*;
public class Main {
    public static long mod= (long) (1e9 +7);
    public static void main(String args[]){
        InputReader s= new InputReader(System.in);
        OutputStream outputStream= System.out;
        PrintWriter out= new PrintWriter(outputStream);
        int n= s.nextInt();
        //out.print(Integer.toString(123,16));
        int sum=0;
        for(int i=2;i<n;i++){
            int y=n;
            for(int j=0;;j++){
                int x= y%i;
                sum= sum+ x;
                y= y/i;
                if(y==0){
                    break;
                }
            }
            //out.println(sum);
        }
        //out.println(sum);
        int div= gcd(sum,n-2);
        out.println((sum/div)+"/"+((n-2)/div));
        out.close();
    }
    public static int sumDigits(String x){
        int sum= 0;
        for(int i=0;i<x.length();i++){
            sum= sum+ x.charAt(i)-48;
        }
        return sum;
        
    }
    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public InputReader(InputStream inputstream) {
          reader = new BufferedReader(new InputStreamReader(inputstream));
          tokenizer = null;
        }
        
        public String nextLine(){
            String fullLine=null;
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                  fullLine=reader.readLine();
                } catch (IOException e) {
                  throw new RuntimeException(e);
                }
                return fullLine;
              }
              return fullLine;
        }
        public String next() {
          while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
              tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
              throw new RuntimeException(e);
            }
          }
          return tokenizer.nextToken();
        }
        public long nextLong() {
              return Long.parseLong(next());
            }
        public int nextInt() {
          return Integer.parseInt(next());
        }
      }
    public static int gcd(int number1, int number2) {  
        if(number2 == 0){
            return number1;
        } 
        return gcd(number2, number1%number2); 
    }
    public static int combinations(int n,int r){
        if(n==r) return 1;
        if(r==1) return n;
        if(r==0) return 1;
        return combinations(n-1,r)+ combinations(n-1,r-1);
    }

    public static int expo(int a, int b){
        if (b==1)
            return a;
        if (b==2)
            return a*a;

        if (b%2==0){
                return expo(expo(a,b/2),2);
        }
        else{
            return a*expo(expo(a,(b-1)/2),2);
        }
    }
    
    public static void sieve(int N){
        int arr[]= new int[N+1];
        for(int i=2;i<Math.sqrt(N);i++){
            if(arr[i]==0){
                for(int j= i*i;j<= N;j= j+i){
                    arr[j]=1;
                }
            }
        }
        // All the i for which arr[i]==0 are prime numbers.
    }
}
