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.*;
import java.util.*;

public class Main {
	
	static int n ;
	static HashMap<Integer,Integer> hm;
	 	 	 
	public static void main( String args[] )
	{
		
		MyScanner sc = new MyScanner();
		
		int a = sc.nextInt();
		
		long counter = 0 ; 
		long sum = 0 ; 
		
		
		for( int i = 2 ; i < a ; ++i )
		{
			sum += base( a , i );
			counter++;
		}
		
		
		long g = gcd( sum , counter );
		
		System.out.println( sum/g + "/"  + counter/g);
		
		
		
	}
	
	
	static long gcd( long a , long b )
	{
		if( a == 0 ) return b ; 
		else if( b == 0 ) return a ;
		
		else if( a > b )
			return gcd( b , a%b );
		
		else
			return gcd( a , b%a );
		
	}
	static long base( int a , int base)
	{
		long ans = 0 ; 
		
		while ( a > 0 )
		{
			ans +=  a%base;
			a /= base;
		}
		
		return ans;
	}
	
static class MyScanner {
	      BufferedReader br;
	      StringTokenizer st;
	 
	      public MyScanner() {
	         br = new BufferedReader(new InputStreamReader(System.in),8*1024);
	      }
	 
	      String next() {
	          while (st == null || !st.hasMoreElements()) {
	              try {
	                  st = new StringTokenizer(br.readLine());
	              } catch (IOException e) {
	                  e.printStackTrace();
	              }
	          }
	          return st.nextToken();
	      }
	 
	      int nextInt() {
	          return Integer.parseInt(next());
	      }
	 
	      long nextLong() {
	          return Long.parseLong(next());
	      }
	 
	      double nextDouble() {
	          return Double.parseDouble(next());
	      }
	 
	      String nextLine(){
	          String str = "";
		  try {
		     str = br.readLine();
		  } catch (IOException e) {
		     e.printStackTrace();
		  }
		  return str;
	      }

	   }

static class MyWriter {
	    BufferedWriter bw;

	    public  MyWriter() {
	       bw = new BufferedWriter(new OutputStreamWriter(System.out),8*1024);
	    }

	    void print(String s)
	    {
	    	
	    }
	    
	    void println(String s)
	    {
	    	try {
				bw.write( s , 0 , s.length() );
				bw.newLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	    }

	 void close()
	 {
		 try {
			bw.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	 }
	}

	
}
