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 contains one integer number A (3 ≤ A ≤ 1000).

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

NoteIn 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.

//by Nick Buelich
import java.util.*;
import java.io.*;

public class x13A{
	public static void main(String[] args)throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int total=0;
		for(int a=2;a<n;a++){
			int q=n;
			while (q!=0){
				total+=(q%a);
				q/=a;
			}
		}
		int j=0;int k=0;
		j=total/GCD(total,n-2);
		k=(n-2)/GCD(total,n-2);
		System.out.printf("%d/%d", j,k);
	}
	static int GCD(int a, int b){
		if(b==0)return a;
		return GCD(b,a%b);
	}
}

import java.util.Scanner;

public class RENAMETHISBITCH {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {

			int n = sc.nextInt();
			int sum = 0;

			for (int i = 2; i < n; i++) {
				sum += digitSum(n, i);
			}

			int gcd = gcd(sum, n - 2);
			System.out.println((sum / gcd) + "/" + ((n - 2) / gcd));
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}

	private static int digitSum(int n, int b) {

		int sum = 0;
		while (0 < n) {
			sum += (n % b);
			n /= b;
		}
		return sum;
	}

	public static int gcd(int a, int b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}
}

import static java.lang.Math.*;
import java.util.*;
import java.io.*;

public class _13_A {

    boolean showDebug = true;

    public void solve() throws Exception {

        int n = nextInt();
        int cnt = 0;
        for (int i=2; i<n; i++) cnt+=digitSum(n,i);
        println(cnt/gcd(cnt,n-2)+"/"+(n-2)/gcd(cnt,n-2));
    }

    int digitSum(long i, int base) {
        i = abs(i);
        int r = 0;
        while (i>0) {
            r+=i%base;
            i/=base;
        }
        return r;
    }

    ////////////////////////////////////////////////////////////////////////////

    double EPS = 1e-7;
    int INF = Integer.MAX_VALUE;
    long INFL = Long.MAX_VALUE;
    double INFD = Double.MAX_VALUE;

    int[] dx = {0,1,0,-1};
    int[] dy = {-1,0,1,0};
    int[] dx8 = {0,1,1,1,0,-1,-1,-1};
    int[] dy8 = {-1,-1,0,1,1,1,0,-1};
    int[] knightMovesX = {1,2,2,1,-1,-2,-2,-1};
    int[] knightMovesY = {-2,-1,1,2,2,1,-1,-2};

    @SuppressWarnings("serial")
    class IncMap extends HashMap<Object, Integer> {
        boolean add(Object key, int amount) {
            Integer i = get(key);
            if (i!=null) {
                put(key, i+amount);
                return false;
            } else {
                put(key, amount);
                return true;
            }
        }
        boolean add(Object key) {
            return add(key, 1);
        }
    }

    int min(int... nums) {
        int r = INF;
        for (int i: nums)
            if (i<r) r=i;
        return r;
    }
    int max(int... nums) {
        int r = -INF;
        for (int i: nums)
            if (i>r) r=i;
        return r;
    }
    long minL(long... nums) {
        long r = INFL;
        for (long i: nums)
            if (i<r) r=i;
        return r;
    }
    long maxL(long... nums) {
        long r = -INFL;
        for (long i: nums)
            if (i>r) r=i;
        return r;
    }
    double minD(double... nums) {
        double r = INFD;
        for (double i: nums)
            if (i<r) r=i;
        return r;
    }
    double maxD(double... nums) {
        double r = -INFD;
        for (double i: nums)
            if (i>r) r=i;
        return r;
    }
    long sumArr(int[] arr) {
        long res = 0;
        for (int i: arr)
            res+=i;
        return res;
    }
    long sumArr(long[] arr) {
        long res = 0;
        for (long i: arr)
            res+=i;
        return res;
    }
    double sumArr(double[] arr) {
        double res = 0;
        for (double i: arr)
            res+=i;
        return res;
    }

    long partsFitCnt(long partSize, long wholeSize) {
        return (partSize+wholeSize-1)/partSize;
    }

    boolean odd(long i) {
        return (i&1)==1;
    }

    long digitProd(long i) {
        if (i==0) return 0;
        i = abs(i);
        long r = 1;
        while (i>0) {
            r*=i%10;
            i/=10;
        }
        return r;
    }

    long gcd (long a, long b) {
        while (b>0) {
            a%=b;
            long tmp=a; a=b; b=tmp;
        }
        return a;
    }
    long lcm(long a, long b) {
        return (a*b)/gcd(a,b);
    }

    double log_2 = log(2);
    double log2(double i) {
        if (i<=0) return -INFD;
        return log(i)/log_2;
    }
    long binpow(int x, int n) {
        long r = 1;
        while (n>0) {
            if ((n&1)!=0) r*=x;
            x*=x;
            n>>=1;
        }
        return r;
    }
    long fac(int i) {
        if (i>20) throw new IllegalArgumentException();
        return i<=1 ?  1:fac(i-1)*i;
    }

    double dist(double x, double y, double xx, double yy) {
        return sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y));
    }

    boolean isPalindrome(String s) {
        for (int i=0; i<s.length()/2; i++)
            if (s.charAt(i)!=s.charAt(s.length()-1-i)) return false;
        return true;
    }
    int occurenciesCnt(String s, String pattern) {
        int res = 0;
        for (int i=0; i<s.length()-pattern.length()+1; i++)
            if (s.substring(i, i+pattern.length()).equals(pattern)) res++;
        return res;
    }
    int occurenciesCnt(String s, char pattern) {
        int res = 0;
        for (int i=0; i<s.length(); i++)
            if (s.charAt(i)==pattern) res++;
        return res;
    }

    int[] months = {0,31,28,31,30,31,30,31,31,30,31,30,31};
    boolean isLeapYear(int y) {
        return y%4==0 && (y%400==0 || y%100!=0);
    }
    boolean isValidDate(int d, int m, int y) {
        if (isLeapYear(y) && m==2 && d==29) return true;
        return m>0 && m<=12 && d>0 && d<=months[d];
    }
    int[] nextDay(int d, int m, int y) {
        if (d>=months[m])
            if (m==2 && d==28 && isLeapYear(y)) d++;
            else {d=1; m++;}
        else
            d++;
        if (m==13) {d=1; m=1; y++;}
        return new int[] {d,m,y};
    }

    String str(Object o) {
        return o.toString();
    }

    long timer = System.currentTimeMillis();
    void startTimer() {
        timer = System.currentTimeMillis();
    }
    void stopTimer() {
        System.err.println("time: "+(System.currentTimeMillis()-timer)/1000.0);
    }

    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));

    String nextLine() throws IOException {
        return in.readLine();
    }
    String nextWord() throws IOException {
        StringBuilder sb = new StringBuilder();
        int c = 0;
        while (c<=' ') c=in.read();
        while (c>' ') {
            sb.append((char)c);
            c = in.read();
        }
        return sb.toString();
    }
    int nextInt() throws NumberFormatException, IOException {
        return Integer.parseInt(nextWord());
    }
    long nextLong() throws NumberFormatException, IOException {
        return Long.parseLong(nextWord());
    }
    double nextDouble() throws NumberFormatException, IOException {
        return Double.parseDouble(nextWord());
    }
    int[] nextArr(int size) throws NumberFormatException, IOException {
        int[] arr = new int[size];
        for (int i=0; i<size; i++)
            arr[i] = nextInt();
        return arr;
    }
    long[] nextArrL(int size) throws NumberFormatException, IOException {
        long[] arr = new long[size];
        for (int i=0; i<size; i++)
            arr[i] = nextLong();
        return arr;
    }
    double[] nextArrD(int size) throws NumberFormatException, IOException {
        double[] arr = new double[size];
        for (int i=0; i<size; i++)
            arr[i] = nextDouble();
        return arr;
    }
    String[] nextArrS(int size) throws NumberFormatException, IOException {
        String[] arr = new String[size];
        for (int i=0; i<size; i++)
            arr[i] = nextWord();
        return arr;
    }

    void print(Object o) throws IOException {
        out.write(o.toString());
    }
    void println(Object o) throws IOException {
        out.write(o.toString());
        out.newLine();
    }
    void print(Object... o) throws IOException {
        for (int i=0; i<o.length; i++) {
            if (i!=0) out.write(' ');
            out.write(o[i].toString());
        }
    }
    void println(Object... o) throws IOException {
        print(o);
        out.newLine();
    }
    void printArr(int[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Integer.toString(arr[i]));
        }
    }
    void printArr(long[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Long.toString(arr[i]));
        }
    }
    void printArr(double[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(Double.toString(arr[i]));
        }
    }
    void printArr(String[] arr) throws IOException {
        for (int i=0; i<arr.length; i++) {
            if (i!=0) out.write(' ');
            out.write(arr[i]);
        }
    }
    void printlnArr(int[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(long[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(double[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }
    void printlnArr(String[] arr) throws IOException {
        printArr(arr);
        out.newLine();
    }

    void debug(Object... o) {
        if (showDebug) System.err.println(Arrays.deepToString(o));
    }

    public static void main(String[] args) throws Exception {
        Locale.setDefault(Locale.US);
        new _13_A().solve();
        out.flush();
        out.close(); in.close();
    }
}

import java.util.*;
public class number
{
    public static void main(String[] args)
    {
        helper a = new helper();
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int result = 0;
        int C = A;
        String res= "";
        int i = 2;
        for (i = 2; i < C; i++)
        {
            A = C;
            while(A >= i)
            {
                result = result+A%i;
                A = A - A%i;
                A = A/i;
            }
            result+=A;
        }
        int gc = a.gcd(result, C-2);
        result = result/gc;
        res = result+"/"+(C-2)/gc;

            System.out.println(res);

    }

}
class helper
{
    int gcd (int a, int b)
    {
        if (b == 0)
            return a;
        else
            return gcd (b, a % b);
    }
    int lcm(int a, int b)
    {
        return a / gcd(a, b) * b;
    }
}

import java.util.*;
public class Bases {
	public static long res = 0;
	public static long gcd(long a, long b){ //b es el chico
		if(b > a) return gcd(b,a);
		if(b == 0) return a;
		else return gcd(b,a%b);
	}
        public static void add(int n, int i){
                while(n > 0){
                        res += n % i;
                        n = n/i;
                }
        }
	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		for(int i = 2; i <= n-1; i++){
			add(n,i);
		}
		long r = gcd(res,(n-2));
		System.out.printf("%d/%d\n",res/r,(n-2)/r);
		seer.close();
	}
}

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

/*
import doge.wow.Shibeforces;
░░░░░░░░░▄░░░░░░░░░░░░░░▄░░░░
░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌░░░
░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐░░░
░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐░░░
░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐░░░
░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌░░░
░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌░░
░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐░░
░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌░
░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌░
▀▒▀▐▄█▄█▌▄░▀▒▒░░░░░░░░░░▒▒▒▐░
▐▒▒▐▀▐▀▒░▄▄▒▄▒▒▒▒▒▒░▒░▒░▒▒▒▒▌
▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒▒▒░▒░▒░▒▒▐░
░▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒░▒░▒░▒░▒▒▒▌░
░▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▒▄▒▒▐░░
░░▀▄▒▒▒▒▒▒▒▒▒▒▒░▒░▒░▒▄▒▒▒▒▌░░
░░░░▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀░░░
░░░░░░▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀░░░░░
░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▀▀░░░░░░░░
wow
much code violence
such danger
hw dis hapen?!!
*/

public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int a = in.nextInt();
		int sum = 0;
		for(int i = 2; i <= a - 1;i++){
			int temp = a;
			while(temp != 0){
				sum = sum + temp % i;
				temp = temp / i;
			}
		}
		int g = gcd(sum , a - 2);
		a -= 2;
		System.out.println(sum/g + "/" + a/g);
	}
	public static int gcd(int x, int y){
		return (y == 0) ? x : gcd (y, x % y);
	}
}

import java.util.Scanner;

public class Numbers {

    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum=0, div=0, den=n-2;

        for (int i=2; i<n; i++) {
            div=n;
            while(div!=0) {
                sum += div%i;
                div /= i;
            }
        }

        int gcd = gcd(sum, den);
        sum /= gcd;
        den /= gcd;
        System.out.println(sum+"/"+den);
    }

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

import java.io.*;
import java.util.*;
import java.math.*;

public class P13A {

  public PrintWriter run() {
    int A = sc.nextInt();
    int sum = 0;

    for (int sys = 2; sys < A; sys++) {
      int a = A; // zzz...
      while (a > 0) {
        sum += a % sys;
        a /= sys;
      }
    }

    int gcd = BigInteger.valueOf(sum).gcd(BigInteger.valueOf(A - 2)).intValue();

    pw.println((sum / gcd) + "/" + ((A - 2) / gcd));

    return pw;
  }

  private Scanner sc = new Scanner(new BufferedInputStream(System.in));
  private PrintWriter pw = new PrintWriter(new BufferedOutputStream(System.out));

  public static void main(String[] args) throws Exception {
    new P13A().run().close();
  }
}

import java.util.*;
import java.math.*;
import java.io.*;
public class Main {
    public static StringTokenizer st;
    public static BufferedReader scan;
    public static PrintWriter out;
    public static int gcd(int a, int b){
        if(a < b)return gcd(b, a);
        else if(b == 0)return a;
        else return gcd(b, a % b);
    }
    public static void main(String[] args) throws  IOException{
        scan = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int a = nextInt();
        int s = 0;
        Set <Integer>S = new HashSet();
        for(int i = 2; i < a; i++){

            int n = a;
            while(n > 0){
                s += n%i;
                n /= i;
            }
        }
        int x = s;
        int y = a - 2;
         out.println(s / gcd(x, y) + "/" + (y / gcd(x, y)));
        scan.close();
        out.close();
    }
    public static BigInteger nextBigInteger() throws  IOException {
        return new BigInteger(next());
    }
    public static long nextLong() throws  IOException {
        return Long.parseLong(next());
    }
    public static double nextDouble() throws  IOException {
        return Double.parseDouble(next());
    }
    public static int nextInt() throws  IOException {
        return Integer.parseInt(next());
    }
    public static String next() throws IOException {
        while(st == null || !st.hasMoreTokens()){
            st = new StringTokenizer(scan.readLine());
        }
        return st.nextToken();
    }
}

import java.util.Scanner;

public class NUmbers {

	public static int gcd(int a,int b){
		if(b==0)
			return a;
		return(gcd(b,a%b));
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int a,sum=0,i,tmp;
		a = s.nextInt();
		for(i=2;i<a;++i){
			tmp=a;
			while(tmp>0){
				sum+=tmp%i;
				tmp/=i;
			}
		}
		int d=a-2;
		int gcd=gcd(sum,d);
		System.out.println(sum/gcd+"/"+d/gcd);

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BNumbers
{
	static int base(int n , int b)
	{
		int sum = 0;
		while(n > 0)
		{
			int  d =n % b;
			//System.out.print(d+" ");
			n /= b;
			sum += d;
		}

		return sum;
	}

	static int gcd(int n, int m)
	{
		if(m == 0)
			return n;
		return gcd(m,n%m);
	}

	public static void main(String[] args) throws NumberFormatException, IOException
	{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int sum = 0;
		for (int i = 2; i < n; i++)
		{
			sum += base(n, i);
		}
		int gcd = gcd(sum, n-2);
		sum /= gcd;
		int d = (n-2) / gcd;
		System.out.println(sum +"/"+ d);
	}
}

import java.util.Scanner;

public class Numbers {
    static long gcd(long num1, long num2) {
        if(num1 % num2 == 0) {
            return num2;
        }
        return gcd(num2, num1%num2);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int numBases = n-2;
        long sum = 0;
        for(int i = 2; i < n; ++i) {
            int tmp = n;
            while (tmp > 0) {
                int digit = tmp % i;
                sum += digit;
                tmp /= i;
            }
        }
        long gcd = gcd(sum, numBases);
        sum /= gcd;
        numBases /= gcd;
        System.out.println(sum+"/"+numBases);
    }
}

import java.util.*;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.lang.*;
import java.math.BigInteger;
public class test {
	static Scanner in = new Scanner (System.in);
	static PrintWriter out = new PrintWriter (System.out);

    public static void main (String [] args){

       int n = in.nextInt();
    	int sumation = 0;
    for(int i = 2 ; i<=n-1 ; i++){
    		sumation+=find(n,i);
    		//out.println(find(n,i));
    		//out.println(sumation);
    	}

    	int gcd = gcd(sumation,n-2);

    	out.printf("%d/%d\n",sumation/gcd,(n-2)/gcd);

		out.flush();
		out.close();

	}

	static int find(int num, int base)
	{
		int ret = 0;
		while(num > 0)
		{
			ret += num % base;
			num /= base;
		}
		return ret;
	}

	static int gcd(int a, int b)
	{
		return b == 0 ? a : gcd(b, a%b);
	}

}

import java.io.*;
import java.util.*;

public class q2cp101{
   public static void main(String[] args) {
      MyScanner sc = new MyScanner();

      out = new PrintWriter(new BufferedOutputStream(System.out));
         int n=sc.nextInt();
         int t=n;
      int unitDigit, sum = 0;
       for (int i = 2; i < n; i++) {

    while (n > 0)
    {unitDigit = n % i;

        sum += unitDigit;
        n = n / i;
    }
    n=t;
       }
       int z=gcd(sum,n-2);
       int a1=sum/z;
       int a2=(n-2)/z;

       out.println(a1+"/"+a2);
      out.close();
   }

     static int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);

}

   //-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;

   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;

      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }

      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;
      }

   }
   //--------------------------------------------------------
}

import java.util.Scanner;
public class CF13A {
   public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int s;
		int  a=scan.nextInt();int x=0; int sum=0;
		scan.close();
		if(a==3) System.out.println("2/1");
		else { for(int i=2;i<a;i++) {
			x=a;
			while(x!=0) {
				 if(x%i!=0||x!=0)
				{sum +=(x%i); x=((x-(x%i))/i);   /*System.out.println(sum+" "+i);*/}
			      }
		  }
		x=a-2;
		if(sum/(x-2)==0) {sum=sum/(a-2); System.out.println(sum+"/"+1);}
		else { for(int i=60;i>=2;i--) { if(sum%i==0&&x%i==0) {sum=sum/i;x=x/i;}} System.out.println(sum+"/"+x);  }}
	}

}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.ArrayList;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
            try (PrintWriter out = new PrintWriter(outputStream)) {
                TaskB solver = new TaskB();
                solver.solve(1, in, out);
            }
    }
}
class TaskB {
    class Point{
        int b;
        int i;
        int r;
        public Point(int b, int i, int r){
            this.b = b;
            this.i = i;
            this.r = r;
        }
    }
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int m = 2;
        int sum = 0;
        while(m < n){
            int k = n;
            while(k > 0){
                sum += k%m;
                k /= m;
            }
            m++;
        }
        n -= 2;
        int g = gcd(sum, n);
        out.println(sum/g + "/" + n/g);
    }
    private static int gcd(int a, int b){
        if(b == 0) return a;
        return gcd(b, a%b);
    }
}
class InputReader {
    private final BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }
    public long nextLong() {
        return Long.parseLong(next());
    }
    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

import java.util.*;

public class Solution {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int A = s.nextInt();

        int sum = 0;
        int denom = A - 2;

        for (int i = 2; i < A; i++) {
            int n = A;

            // get sum of digits for the current i
            while (n > 0) {
                sum += n % i;
                n /= i;
            }
        }

        int div = gcd(sum, denom);

        System.out.println((sum / div) + "/" + (denom / div));

        s.close();
    }

    private static int gcd(int m, int n) {
        while (n != 0) {
            int a = m % n;
            m = n;
            n = a;
        }

        return m;
    }
}

import java.io.*;
import java.util.*;

public class Main
{
	public static void main(String sdafp[])throws IOException
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		int n=Integer.parseInt(br.readLine());
		int db=(n-1)-2+1;
		long sum=0;
		String b2=Integer.toBinaryString(n);
		for(int i=0;i<b2.length();i++)
		{
			sum+=Integer.parseInt(""+b2.charAt(i));
		}
		for(int i=3;i<=n-1;i++)
		{
			int num=n;
			int base=i;
			int rem=num%base;
			sum+=rem;
			num=num/base;
			while(true)
			{
				rem=num%base;
				num=num/base;
				sum+=rem;
				if(num<base)
					break;
			}
			sum+=num;
		}
		long gcd=findGcd(sum,(long)db);
		System.out.println(sum/gcd+"/"+db/gcd);

	}
	public static long findGcd(long x,long y)
	{
		if(x==0||y==0)
			return x+y;
		return findGcd(y,x%y);
	}
}

import java.io.*;
public class a13
{
    public static void main(String args[])throws IOException
    {
        InputStreamReader read=new InputStreamReader(System.in);
        BufferedReader in=new BufferedReader(read);
        int n,sum=0,i,r,a,den,num,q;
        //System.out.println("Enter");
        n=Integer.parseInt(in.readLine());
        for(i=2;i<=n-1;i++)
        {
            a=n;
            while(a!=0)
            {
                r=a%i;
                sum+=r;
                a/=i;
            }
        }
        a=n-2;
        i=sum;
        while(sum%a!=0)
        {
            r=sum%a;
            sum=a;
            a=r;
        }
        System.out.println(i/a+"/"+(n-2)/a);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main13A {

    private FastScanner in;
    private PrintWriter out;

    public void solve() throws IOException {
        int A = in.nextInt();

        int sum = 0;
        for(int b = 2; b <= A - 1; b++){
            int t = A;
            while(t > 0){
                sum += (t % b);
                t /= b;
            }
        }

        int num = sum;
        int div = A - 2;

        int g = gcd(num, div);
        num /= g;
        div /= g;

        out.print(num + "/" + div);
    }

    private int gcd(int a, int b){
        if(a < b){
            int t = a;
            a = b;
            b = t;
        }
        int r = a % b;
        if (r == 0){
            return b;
        }
        return gcd(b, r);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }

    public static void main(String[] arg) {
        new Main13A().run();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Place here class purpose.
 *
 * @author Kirill
 * @since 20.10.2020
 */
public class Task13A {
    public static void main(String[] args) throws IOException {
        Task13A task13A = new Task13A();
        task13A.resolve();
    }

    private void resolve() throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int number = Integer.parseInt(bufferedReader.readLine());

        int digitSum = 0;
        for (int i = 2; i < number; i++) {
            int num = number;

            while (num > 0) {
                digitSum += num % i;
                num /= i;
            }
        }

        System.out.println(createFraction(digitSum, number - 2));
    }

    private static String createFraction(int numerator, int denominator) {
        int min = Math.min(numerator, denominator);
        for (int i = 2; i < min; i++) {
            while (numerator % i == 0 && denominator % i == 0) {
                numerator /= i;
                denominator /= i;
            }
        }

        return numerator + "/" + denominator;
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.InputMismatchException;

public class GetTheGift {
    private InputReader in;
    private PrintWriter out;

    private void solve() {
        int A = in.readInt();
        int sum = 0;
        for (int i = 2 ; i < A ; i++) {
            int b = A;
            int s = 0;
            while (b > 0) {
                s += b % i;
                b /= i;
            }
            sum += s;
        }
        A -= 2;
        int gcd = BigInteger.valueOf(sum).gcd(BigInteger.valueOf(A)).intValue();
        sum /= gcd;
        A /= gcd;
        System.out.println(sum +"/"+A);
    }

    public static void main(String[] args) {
        new GetTheGift().run();
    }

    private GetTheGift() {

        in = new InputReader(System.in);
        out = new PrintWriter(System.out);
    }

    private void run() {

        solve();
        exit();
    }

    @SuppressWarnings({ "UnusedDeclaration" })
    private void exit() {
        out.close();
        System.exit(0);
    }

    @SuppressWarnings({ "UnusedDeclaration" })
    private static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar, numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private String readLine0() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                if (c != '\r')
                    buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public String readLine() {
            String s = readLine0();
            while (s.trim().length() == 0)
                s = readLine0();
            return s;
        }

        public String readLine(boolean ignoreEmptyLines) {
            if (ignoreEmptyLines)
                return readLine();
            else
                return readLine0();
        }

        public BigInteger readBigInteger() {
            try {
                return new BigInteger(readString());
            } catch (NumberFormatException e) {
                throw new InputMismatchException();
            }
        }

        public char readCharacter() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            return (char) c;
        }

        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = readInt();
            return array;
        }

        public long[] readLongArray(int size) {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
                array[i] = readLong();
            return array;
        }

        public double[] readDoubleArray(int size) {
            double[] array = new double[size];
            for (int i = 0; i < size; i++)
                array[i] = readDouble();
            return array;
        }

        public String[] readStringArray(int size) {
            String[] array = new String[size];
            for (int i = 0; i < size; i++)
                array[i] = readString();
            return array;
        }

        public char[][] readTable(int rowCount, int columnCount) {
            char[][] table = new char[rowCount][columnCount];
            for (int i = 0; i < rowCount; i++) {
                for (int j = 0; j < columnCount; j++)
                    table[i][j] = readCharacter();
            }
            return table;
        }

        public void readIntArrays(int[]... arrays) {
            for (int i = 0; i < arrays[0].length; i++) {
                for (int j = 0; j < arrays.length; j++)
                    arrays[j][i] = readInt();
            }
        }
    }
}

import java.io.*;
import java.util.*;
public class HelloWorld{

     public static void main(String []args){
         Scanner sc=new Scanner(System.in);
          int a=sc.nextInt();
          int sum=0;
          for(int i=2;i<a;i++)
          {
              int temp=a;
              while(temp>0)
              {
                  sum=sum+(temp%i);
                  temp=temp/i;
              }
          }
        int gcd=f(a-2,sum);
        int k1=(a-2)/gcd;
        int k2=sum/gcd;
        System.out.println(k2+"/"+k1);
          }
     public static int f(int a,int b)
     {
         if(b==0)
         return a;
         return f(b,a%b);
     }
}

import java.util.*;
public class A13 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt(), counter = 0;
		for(int i = 2; i < num; i++)
			counter += base(num,i);
		num -= 2;
		for(int i = num; i > 1; i--)
			while(counter % i == 0 && num % i == 0) {
				counter /= i;
				num /= i;
			}
		System.out.println(counter+"/"+(num));
	}

	public static int base(int num, int base) {
		int sum = 0;
		while(num >= base) {
			sum = sum + (num % base);
			num /= base;
		}
		sum += num;
		return sum;
	}
}

import java.util.Scanner;

public class Main {
	static int GCD(int a, int b) {
		if (b==0) return a;
		return GCD(b,a%b);
	}

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a=in.nextInt();
		int x;
		int k=0;
		for (int i =2;i<=a/2;i++){ x=a ;while (x>=1){k+=x%i;x/=i;}}
		int n=(int)(a-Math.ceil(a/2));
		k+=(n*(n+1)/2)-1;
		int s =GCD(k,(a-2));
		System.out.println(k/s+"/"+(a-2)/s);

	}
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class sample22 {

    static class FastScanner{
        BufferedReader s;
        StringTokenizer st;

        public FastScanner(){
            st = new StringTokenizer("");
            s = new BufferedReader(new InputStreamReader(System.in));
        }

        public FastScanner(File f) throws FileNotFoundException{
            st = new StringTokenizer("");
            s = new BufferedReader (new FileReader(f));
        }

        public int nextInt() throws IOException{
            if(st.hasMoreTokens())
                return Integer.parseInt(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextInt();
            }
        }

      public double nextDouble() throws IOException{
            if(st.hasMoreTokens())
                return Double.parseDouble(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextDouble();
            }
        }

        public long nextLong() throws IOException{
            if(st.hasMoreTokens())
                return Long.parseLong(st.nextToken());
            else{
                st = new StringTokenizer(s.readLine());
                return nextLong();
            }
        }

        public String nextString() throws IOException{
            if(st.hasMoreTokens())
                return st.nextToken();
            else{
                st = new StringTokenizer(s.readLine());
                return nextString();
            }

        }
        public String readLine() throws IOException{
            return s.readLine();
        }

        public void close() throws IOException{
            s.close();
        }

    }
      private static FastScanner s = new FastScanner();
      private static PrintWriter ww = new PrintWriter(new OutputStreamWriter(System.out));

      static int sum=0; static int b=0;
     public static void main(String[] args) throws IOException
     {
        int n = s.nextInt();int a=n;
        for(int i=2;i<n;i++)
        {   b=0;
            sum+=fact(a,i);
         //  ww.println("  sum "+sum+" for base "+i);
        }
         if(sum==(n-2))
         ww.println(1);
         else
         {
            int c = gcd(sum,(n-2));
             ww.println(sum/c+"/"+(n-2)/c);
         }
         s.close();
         ww.close();
     }
     public static int fact(int a,int base)
     {
         if(a!=0)
         {b+=a%base;fact(a/base,base);}
           return b;
     }
     public static int gcd(int a, int b){
        return b == 0 ? a : gcd(b,a%b);
    }

}
/*zabardast swappimng of sorting
/*
    for(int h=0;h<n;h++)
        {  int temp,temp1,temp2;
             for(int y=h+1;y<n;y++)
           {
             if(a[y][2]>=a[h][2])
             {

             temp=a[y][2];                 //////sorting
             a[y][2]=a[h][2];
              a[h][2]=temp;
              temp1=a[y][0];
              a[y][0]=a[h][0];
              a[h][0]=temp1;
              temp2=a[y][1];
              a[y][1]=a[h][1];
              a[h][1]=temp2;

             }
           }
        }
*/

import java.io.*;
import java.util.*;

import static java.lang.Integer.*;
import static java.lang.Math.*;
public class Code13A {

    public static void main(String[] args)throws Exception  {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(in.readLine());
        long sum = 0;
        for(int i=2;i<N;++i){
            sum+=sum(N,i);
        }
        long s = gcd(sum,N-2);
        if(sum%s == 0 && (N-2)%s==0)
            System.out.println((sum/s)+"/"+((N-2)/s));
        else
            System.out.println((sum)+"/"+((N-2)));
    }

    static long sum(int a, int b){
        long sum = 0;
        while(a>0){
            sum += a%b;
            a/=b;
        }
        return sum;
    }

    static long gcd(long a, long b ){
        long t;
        while(b!=0){
            t=b;
            b=a%b;
            a=t;
        }
        return a;
    }

}

import java.util.Scanner ;

public class SumOfbase1 {
    public static void main(String[] args) {
        Scanner  kb = new Scanner (System.in) ;
        int a = kb.nextInt() ;
        int sum = 0;

        for (int i = 2 ; i<= a-1 ; i++) {
            sum +=  SumofConvert (a, i) ;
       }

       long gcd = hcf(sum, a-2);
       System.out.println(sum/gcd+"/"+(a-2)/gcd);

    } // main

    public static int SumofConvert (int XbaseValue , int fbase) {
        int sum = 0 ;
    while ( XbaseValue !=0 ) {
         sum += XbaseValue % fbase ;
         XbaseValue /= fbase ;
    } ;
        return sum ;
    } //

    public static long hcf(long n1, long n2) {
        if (n2 != 0)
            return hcf(n2, n1 % n2);
        else
            return n1;
    }
} // class

import java.util.Scanner;

/**
 * @author Son-Huy TRAN
 *
 */
public class P13A_Numbers {

	private static int sumDigits(int base10, int base) {
		int sumDigit = 0;

		while (base10 > 0) {
			int temp = base10 % base;
			sumDigit += temp;
			base10 /= base;
		}

		return sumDigit;
	}

	private static int greatestCommonDivisor(int a, int b) {
		while (b != 0) {
			int temp = b;
			b = a % b;
			a = temp;
		}

		return a;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		scanner.close();

		int sumDigits = 0;

		for (int i = 2; i < a; i++) {
			sumDigits += sumDigits(a, i);
		}

		int numerator = sumDigits;
		int denominator = a - 2;
		int gcd = greatestCommonDivisor(numerator, denominator);
		numerator /= gcd;
		denominator /= gcd;

		System.out.println(numerator + "/" + denominator);
	}
}

import java.util.*;

public class Main {
    public static int gcd(int m, int n) {
        while (m % n != 0) {
            int temp = m % n;
            m = n;
            n = temp;
        }
        return n;
    }

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int number = s.nextInt();
        int sum = 0;
        for (int j = 2; j < number; j++) {
            int n = number;
            while (n >= j) {
                sum += (n % j);
                n /= j;
            }
            sum += n;
        }
        int b = number - 2;
        for (int j = 2; j < Math.sqrt(b); j++) {
            if (sum % j == 0 && b % j == 0) {
                sum /= j;
                b /= j;
                j--;
            }
        }
        int g = gcd(sum, b);
        System.out.print(sum / g);
        System.out.print('/');
        System.out.println(b / g);
    }
}

import java.util.ArrayList;
import java.util.Scanner;

public class Prob13A
{

    public static void main(String[] args)
    {

        Scanner scn = new Scanner(System.in);

        int count =0, res = 0, a = scn.nextInt();

        for(int i = 2; i < a; i++)
        {
            res += f(i,a);
            count++;
        }

        int gcd = gcd(res,count);

        System.out.println(res/gcd + "/" + count/gcd);

    }

    private static int gcd(int a, int b) {

        if (b == 0) return a;
        else return gcd(b, a % b);
    }

    private static int f(int i, int a) {
        ArrayList<Integer> list = new ArrayList<Integer>();

        int res;

        while(a >= i)
        {
            list.add(a % i);
            a = a / i;
        }

        list.add(a);

        res = 0;

        for(Integer e : list) res += e;

        return res;
    }

}

import java.util.Scanner;
public class problem13A {
    private static int GCD(int a, int b) {
        int a1 = a;
        int b1 = b;
        while ((a1 != 0) && (b1 != 0))
            if (a1 > b1)
                a1 %= b1;
            else
                b1 %= a1;
        return Math.max(a1, b1);
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        in.close();
        int sum = 0;
        for (int i = 2; i < a; i++) {
            int b = a;
            while (b >= i) {
                sum += b % i;
                b /= i;
            }
            sum += b;
        }
        int gcd = GCD(sum, a - 2);
        System.out.println(sum / gcd + "/" + (a - 2) / gcd);
    }
}

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner r = new Scanner(System.in);

		int A = r.nextInt();

		int sum = 0;
		int cnt = 0;
		for(int b = 2; b <= A-1; b++){
			cnt++;

			int nn = A;
			while(nn > 0){
				sum += nn%b;
				nn /= b;
			}
		}

		int g = gcd(sum, cnt);

		System.out.printf("%d/%d\n", sum/g, cnt/g);
	}

	private static int gcd(int x, int y) {
		if(y == 0)return x;
		else return gcd(y, x%y);
	}

	private static int sum(char[] a) {
		int res = 0;
		for(int i = 0; i < a.length; i++)
			if(Character.isLetter(a[i])) res += a[i]-'a';
			else res += a[i]-'0';
		return res;
	}
}

import java.util.*;

public class Main {

	public static void main(String[] args) {

		// long start = System.currentTimeMillis();
		// long end = System.currentTimeMillis();
		// System.out.println(" Execution time was "+(end-start)+" ms.");

		Scanner kb = new Scanner(System.in);
		int a = kb.nextInt();
		int e=0,d=0;
		int sumsum = 0;
		for(int i = 2;i<a;i++){
			int sum = 0;
			int temp = a;

			while(temp>=1){
				//System.out.println(">>"+temp%i);
				sum+=temp%i;
				temp/=i;
			}
			sumsum+=sum;
			//System.out.println(sum);
		}
		//System.out.println(sumsum);
		//System.out.println(a-2);
		int gcd = GCD(sumsum,a-2);
		e = sumsum/gcd;
		d=(a-2)/gcd;
		System.out.println(e+"/"+d);

	}

	public static int GCD(int a, int b) {
		if (b == 0)
			return a;
		return GCD(b, a % b);
	}

}

import java.util.*;
public class Numbers {

    static int findBaseSum(int n, int b){
        int sum = 0;
        int div = 0;
        while(n>=b){
            div = n/b;
            sum+=(n-(b*div));
            n=div;
        }
        return sum+div;
    }

    // GCD of two numbers
    static Double fabs(Double x){
        return Math.abs(x);
    }

    static int gcd(Double x, Double y){
        Double eps = 1e-4;
        while(fabs(x)>eps && fabs(y)>eps){
            if(x>y) x-= (Math.floor(x/y)*y);
            else    y-= (Math.floor(y/x)*x);
        }
        return (x.intValue()+y.intValue());
    }

    static void solve(){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int b = n;
        int sum = 0;
        while(--b>1) sum+=(findBaseSum(n,b));
        int GCD =  gcd((double)sum,(double)n-2);
        System.out.println((sum/GCD)+"/"+((n-2)/GCD));
    }

    public static void main(String args[]) {
        solve();
    }
}

import java.util.*;
import java.io.*;
public class a {
public static void main(String[] args) throws IOException
{
    //input.init(System.in);
    Scanner input = new Scanner(System.in);
    int n = input.nextInt();
    int t = 0, b = 0;
    for(int i = 2; i<n;i++)
    {
        b++;
        int x = n;
        while(x>0)
        {
            t += x%i;
            x /= i;
        }
    }
    long g = gcd(t,b);
    System.out.println(t/g+"/"+b/g);
}
public static long gcd(long a, long b)
{
if(b == 0) return a;
return gcd(b, a%b);
}
public static class input {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
    static long nextLong() throws IOException {
        return Long.parseLong( next() );
    }
}
}

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        int a = new Scanner(System.in).nextInt();
        int sum = 0;
        for (int i = 2; i < a; i++) {
            int t = a;
            while (t > 0){
                int x = t%i;
                while (x >0){
                    sum += x%i;
                    x /= i;
                }
                t /= i;
            }
        }
        int gcd = gcd(sum,a-2);
        System.out.println(sum/gcd+"/"+(a-2)/gcd);
    }

    private static int gcd(int a, int b) {
        return (b == 0)?a:gcd(b,a%b);
    }
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.Scanner;

/**
 *
 * @author IR_HAM
 */
public class Numbers
{
    public static void main(String [] args)
    {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int [] b = new int[5];
        b[0] = 2;
        int t = 0;
        for(int i = 2; i < a; i++)
            t += sumOfDigitsOnBase(a, i);

        int d = gcd(t, a - 2);
        System.out.println((t / d) + "/" + ((a - 2) / d));
    }

    public static int sumOfDigitsOnBase(int n, int base)
    {
        int t = 0;
        while(n > 0)
        {
            t += n % base;
            n = n / base;
        }

        return t;
    }

    public static int gcd(int a, int b)
    {
        while(b > 0)
        {
            int c = a;
            a = b;
            b = c % b;
        }

        return a;
    }
}

import java.util.*;
import java.io.*;
import java.nio.*;
import java.nio.channels.*;

public class Main {

    static BufferedReader reader;
    static StringTokenizer tokenizer;
    static PrintWriter out = new PrintWriter(Channels.newWriter(Channels.newChannel(System.out), "US-ASCII") );

    static void init(InputStream input) {
        reader = new BufferedReader(new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    static boolean hasNext() {
        boolean eof = false;
        String line = null;

        try {
            while (!eof && !tokenizer.hasMoreTokens()) {
                line = reader.readLine();

                if (line != null) {
                    tokenizer = new StringTokenizer(line);
                }
                else {
                    eof = true;
                }
            }
        }
        catch (Exception e) {
        }

        return !eof;
    }

    static String next() {

        try {
            while ( ! tokenizer.hasMoreTokens() ) {
                tokenizer = new StringTokenizer(reader.readLine() );
            }

        }
        catch (Exception e) {

        }

        return tokenizer.nextToken();
    }

    static Integer nextInt() {
        Integer ret = null;

        try {
            ret = Integer.parseInt(next());
        }
        catch (Exception e) {
        }

        return ret;
    }

    static Double nextDouble() {
        Double ret = null;

        try {
            ret = Double.parseDouble(next());
        }
        catch (Exception e) {
        }

        return ret;
    }

    static int digits(int number, int base) {
        int sum=0;

        while(number >= base) {
            sum += number % base;
            number /= base;
        }

        return sum+number;

    }

    static int gcd(int a, int b) {

        int r = a % b;
        while (r != 0) {
            a = b;
            b = r;

            r = a % b;
        }

        return b;
    }

    public static void main (String args[]) {

        init(System.in);

        int a = nextInt();
        int sum=0;

        for(int i=2; i<a; i++) {
            sum += digits(a,i);
        }

        int gcd = gcd(sum, a-2);
        out.println(sum/gcd+"/"+(a-2)/gcd);

        out.close();
    }
}

import java.util.Scanner;

public class A {
    public static int gcd(int x, int y) {
        if (y == 0)
            return x;
        return gcd(y, x % y);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int sum = 0;
        for (int i = 2; i < n; i++) {
            int temp = n;
            while (temp > 0) {
                sum += temp % i;
                temp /= i;
            }
        }
        int gcd = gcd(sum, n - 2);
        sum /= gcd;
        n = (n - 2) / gcd;
        System.out.println(sum + "/" + n);
    }
}

import java.util.*;
public class A13 {

	public static int val(int A,int x){
		int ans = 0;
		int temp = A;
		while(temp>0){
			ans=ans+temp%x;
			temp=temp/x;
		}
		return ans;
	}

	public static long gcd(long a, long b){
		return a%b==0? b: gcd(b,a%b);
	}

	public static String reduce(long sum, long down){
		long k = gcd(sum,down);
		sum= sum/k;
		down = down/k;
		return (sum+"/"+down);

	}

	public static void main(String args[]){

		Scanner in = new Scanner(System.in);
		int A = in.nextInt();

		long sum=0;
		for(int x = 2;x<A;x++){
			sum=sum+val(A,x);
			//System.out.println(sum);
		}
		System.out.println(reduce(sum,A-2));

	}

}

import java.util.Scanner;
public class A13numbers {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int sum = 0;
		for(int i = 2; i<a; i++) {
			int bsum =basesum(a,i);
			sum += bsum;
		}
		int d = gcd(sum,a-2);
		int p = sum/d;
		int q = (a-2)/d;
		System.out.println(p + "/" + q);
	}
	public static int basesum(int a, int i) {
		int s = 0;
		while(a>0) {
			int b = a%i;
			s += b;
			a = a/i;
		}
		return s;
	}
	public static int gcd(int a, int b) {
		int r = a%b;
		return (r == 0) ? b : gcd(b,r);
	}
}

import java.io.PrintWriter;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        //int t = Integer.parseInt(scn.nextLine());
        int t = 1;
        while (t-- > 0) {
            int A = Integer.parseInt(scn.nextLine());
            int cnt = 0;
            for (int i = 2; i < A; i++) {
                cnt += base(A, i);
            }
            A -= 2;
            int c = gcd(cnt, A);
            pw.printf("%d/%d%n", cnt / c, A / c);
        }
        scn.close();
        pw.close();
    }

    public static int base(int A, int n) {
        int cnt = 0;
        while (A > 0) {
            cnt += A % n;
            A /= n;
        }
        return cnt;
    }

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

import java.util.Scanner;

public class NUmbers {

	public static int gcd(int a,int b){
		if(b==0)
			return a;
		return(gcd(b,a%b));
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int a,sum=0,i,tmp;
		a = s.nextInt();
		for(i=2;i<a;++i){
			tmp=a;
			while(tmp>0){
				sum+=tmp%i;
				tmp/=i;
			}
		}
		int d=a-2;
		int gcd=gcd(sum,d);
		System.out.println(sum/gcd+"/"+d/gcd);

	}

}

import java.util.Scanner;
public class Main{
    static public class Sum{
        int n;
        int sum=0;
        public int sum(int target){
            while(target>0){
                sum+=(target%n);
                target/=n;
            }
            return sum;
        }
    }

    static public class Total{
        int total=0;
        public void modify(int base){
            for(int i=2;i<base;++i){
                Sum temp=new Sum();
                temp.n=i;
                total+=temp.sum(base);
            }
        }
    }
    public static void main(String[] args){
        Total answer=new Total();
        Scanner scan = new Scanner(System.in);
        int n=scan.nextInt();
        answer.modify(n);
        int solution=answer.total;
        GCD divisor=new GCD();
        int val=divisor.gcd(solution,(n-2));
        System.out.print((solution/val)+"/"+((n-2)/val));
    }

    static class GCD{
        public int gcd(int x,int y){
            if(y==0){
                return x;
            }
            else if(y==1){
                return 1;
            }
            else{
                if(x>=y){
                    return gcd(y,x%y);
                }
                else{
                    return gcd(y,x);
                }
            }
        }
    }
}

import java.util.Scanner;

public class Numbers {

    public static  int GCD(int a, int b)
    {
       if (b==0) return a;
       return GCD(b,a%b);
    }

    public static void main(String[] args) {
        Scanner s = new Scanner (System.in);
        int n = s.nextInt();
        int sum=0;
        int a;
        int guc;
        int den = n-2;
        for (int i=2;i<n;i++){
            a=n;
            while (a>0){
                sum += a%i;
                a /= i;
            }
        }
        guc = GCD(sum,den);
        /*int beg = Math.min(sum, n-2);
        for (int j=beg;j>=2;j--){
            if (sum%j==0 && den%j==0) {guc = j;break;}
        }*/
        System.out.println(sum/guc+"/"+den/guc);
    }

}

import java.util.*;
public class Main {

   public static int gcd(int a,int b)
        {
            if(a==0)
            {
                return b;
            }
            return gcd(b%a,a);
        }

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int sum=0,m=0;
        for(int i=2;i<n;i++)
        {
            int k=n;
            while(k!=0)
            {
                sum=sum+(k%i);
                k=k/i;
            }
            m++;
        }
        System.out.println(sum/gcd(sum,m)+"/"+m/gcd(sum,m));

    }
}

import java.util.Scanner;

public class A_Numbers {

    /**
     * 21:35
     */
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int A = s.nextInt();

        int sum = 0;
        for (int i = 2; i < A; i++) {
            sum += dec(A, i);
        }
        int denom = A-2;

        for (int i = 2; i <= A-2; i++) {

            while(sum%i==0 && denom%i==0){
                sum /= i;
                denom /= i;
            }
        }

        System.out.println(String.format("%s/%s", sum, denom));

    }

    private static int dec(int a, int r){
        int ret = 0;
        while(a > 0){
            ret += a % r;
            a /= r;
        }
        return ret;

    }

}

import java.awt.Point;
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.*;

public class Solution13A {

        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
        BufferedReader in;
        PrintWriter out;
        StringTokenizer tok = new StringTokenizer("");

        void init() throws FileNotFoundException{
                if (ONLINE_JUDGE){
                        in = new BufferedReader(new InputStreamReader(System.in));
                        out = new PrintWriter(System.out);
                }else{
                        in = new BufferedReader(new FileReader("input.txt"));
                        out = new PrintWriter("output.txt");
                }
        }

        String readString() throws IOException{
                while(!tok.hasMoreTokens()){
                        tok = new StringTokenizer(in.readLine());
                }
                return tok.nextToken();
        }

        int readInt() throws IOException{
                return Integer.parseInt(readString());
        }

        long readLong() throws IOException{
                return Long.parseLong(readString());
        }

        double readDouble() throws IOException{
                return Double.parseDouble(readString());
        }

        public static void main(String[] args){
                new Solution13A().run();
        }

        public void run(){
                try{
                        long t1 = System.currentTimeMillis();
                        init();
                        solve();
                        out.close();
                        long t2 = System.currentTimeMillis();
                        System.err.println("Time = "+(t2-t1));
                }catch (Exception e){
                        e.printStackTrace(System.err);
                        System.exit(-1);
                }
        }

        static class Utils {

                private Utils() {}

                public static void mergeSort(int[] a) {
                        mergeSort(a, 0, a.length - 1);
                }

                private static void mergeSort(int[] a, int leftIndex, int rightIndex) {
                        final int MAGIC_VALUE = 50;
                        if (leftIndex < rightIndex) {
                                if (rightIndex - leftIndex <= MAGIC_VALUE) {
                                        insertionSort(a, leftIndex, rightIndex);
                                } else {
                                        int middleIndex = (leftIndex + rightIndex) / 2;
                                        mergeSort(a, leftIndex, middleIndex);
                                        mergeSort(a, middleIndex + 1, rightIndex);
                                        merge(a, leftIndex, middleIndex, rightIndex);
                                }
                        }
                }

                private static void merge(int[] a, int leftIndex, int middleIndex, int rightIndex) {
                        int length1 = middleIndex - leftIndex + 1;
                        int length2 = rightIndex - middleIndex;
                        int[] leftArray = new int[length1];
                        int[] rightArray = new int[length2];
                        System.arraycopy(a, leftIndex, leftArray, 0, length1);
                        System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
                        for (int k = leftIndex, i = 0, j = 0; k <= rightIndex; k++) {
                                if (i == length1) {
                                        a[k] = rightArray[j++];
                                } else if (j == length2) {
                                        a[k] = leftArray[i++];
                                } else {
                                        a[k] = leftArray[i] <= rightArray[j] ? leftArray[i++] : rightArray[j++];
                                }
                        }
                }

                private static void insertionSort(int[] a, int leftIndex, int rightIndex) {
                        for (int i = leftIndex + 1; i <= rightIndex; i++) {
                                int current = a[i];
                                int j = i - 1;
                                while (j >= leftIndex && a[j] > current) {
                                        a[j + 1] = a[j];
                                        j--;
                                }
                                a[j + 1] = current;
                        }
                }
        }

        void solve() throws IOException{
        	int A = readInt();
        	int sum = 0;
        	int n = A - 2;
        	for(int i = 2; i < A; i++){
        		sum += Sum(A, i);
        	}
        	int gcd = gcd(sum, n);
        	sum /= gcd;
        	n /= gcd;
        	out.println(sum+"/"+n);
        }

        int Sum(int a, int b){
        	int sum = 0;
        	while(a > 0){
        		sum += a % b;
        		a /= b;
        	}
        	return sum;
        }

        static double distance(long x1, long y1, long x2, long y2){
        	return Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
        }

        static int gcd(int a, int b){
        	while(a != b){
        		if(a > b) a -=b;
        		else b -= a;
        	}
        	return a;
        }

        static long lcm(long a, long b){
        	return a * b /gcd((int)a,(int) b);
        }
}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main  {

    Scanner in;
    PrintWriter out;

    int getSum(int x, int p){
        int ans = 0;
        while (x > 0) {
            ans += x % p;
            x = x / p;
        }
        return ans;
    }

    int gcd(int a, int b){
        if (b==0) {
            return a;
        } else {
            return gcd(b, a%b);
        }
    }

    void solve(){
        int n = in.nextInt();
        int num = 0;
        for (int i = 2; i < n; i++) {
            num += getSum(n, i);
        }
        int den = n - 2;
        int div = gcd(num, den);
        num /= div;
        den /= div;
        out.print(num + "/" + den);
    }

    void run(){
        in = new Scanner(System.in);
        out = new PrintWriter(System.out);

        try {
            solve();
        } finally {
            out.close();
        }
    }

    public static void main(String[] args) {
        new Main().run();
    }
}

import java.util.*;

public class Numbers
{
	public static void getInBase(int n, int b, int[] ar)
	{
		int i = 0;
		Arrays.fill(ar, 0);

		while(n > 0)
		{
			ar[i++] = n % b;
			n /= b;
		}
	}

	public static int gcd(int a, int b)
	{
		return b == 0 ? a : gcd(b, a % b);
	}

	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] ar = new int[1001];
		int sum = 0;

		for(int i = 2; i < n; ++i)
		{
			getInBase(n, i, ar);

			for(int x : ar)
				sum += x;
		}

		int g = gcd(sum, n - 2);
		System.out.printf("%d/%d\n", sum / g, (n - 2) / g);
	}
}

import java.io.*;
public class a13
{
    public static void main(String args[])throws IOException
    {
        InputStreamReader read=new InputStreamReader(System.in);
        BufferedReader in=new BufferedReader(read);
        int n,sum=0,i,r,a,den,num,q;
        //System.out.println("Enter");
        n=Integer.parseInt(in.readLine());
        for(i=2;i<=n-1;i++)
        {
            a=n;
            while(a!=0)
            {
                r=a%i;
                sum+=r;
                a/=i;
            }
        }
        a=n-2;
        i=sum;
        while(sum%a!=0)
        {
            r=sum%a;
            sum=a;
            a=r;
        }
        System.out.println(i/a+"/"+(n-2)/a);
    }
}

import java.util.*;
import java.awt.geom.*;
import java.io.*;
import java.math.*;

public class Main
{

  public static void main(String[] args) throws Exception
  {
    long startTime = System.nanoTime();
    int A = in.nextInt();
    int ans = 0;
    for(int i=2;i<A;i++)
    {
        ans+=sum(A,i);
    }
    int dr = A-2;
    int gcd_val = gcd(ans,dr);
    ans/=gcd_val;
    dr/=gcd_val;
    out.println(ans + "/" + dr);
    long endTime = System.nanoTime();
    err.println("Execution Time : +" + (endTime-startTime)/1000000 + " ms");
    exit(0);
  }

  static int gcd(int a,int b)
  {
     while(b!=0)
     {
       int t=b;
       b=a%b;
       a=t;
     }
     return a;
  }

  static int sum(int num,int base)
  {
     int ans = 0;
     while(num>0)
     {
        ans+=num%base;
        num/=base;
     }
     return ans;
  }

  static class InputReader
  {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        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 double nextDouble(){
           return Double.parseDouble(next());
        }
    }

    static void exit(int a)
    {
      out.close();
      err.close();
      System.exit(a);
    }

    static InputStream inputStream = System.in;
    static OutputStream outputStream = System.out;
    static OutputStream errStream = System.err;
    static InputReader in = new InputReader(inputStream);
    static PrintWriter out = new PrintWriter(outputStream);
    static PrintWriter err = new PrintWriter(errStream);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

}

import java.util.*;

public class A
{
   public static void main(String[] args)
   {
      new A(new Scanner(System.in));
   }

   long gcd(long a, long b)
   {
      return b==0 ? a : gcd(b, a%b);
   }

   public A(Scanner in)
   {
      int v = in.nextInt();

      long cnt = 0;
      long st = 0;
      for (int b=2; b<v; b++)
      {
         cnt++;
         int val = v;
         long sum = 0;
         while (val > 0)
         {
            sum += val%b;
            val = val/b;
         }

         st += sum;
      }

      long g = gcd(st, cnt);

      long numer = st/g;
      long denom = cnt/g;

      System.out.printf("%d/%d%n", numer, denom);
   }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.PrintStream;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author captainTurtle
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int a = in.nextInt();
            int s = 0, m = 0, a2;

            for (int i = 2; i <= a - 1; i++) {
                a2 = a;
                while (a2 / i >= 1) {
                    m += a2 % i;
                    a2 = a2 / i;
                }
                m += a2;
                s += 1;
            }
            for (int i = s / 2; i >= 2; i--) {
                if (m % i == 0 && s % i == 0) {
                    m /= i;
                    s /= i;
                }
            }
            System.out.print(m + "/" + s);
        }

    }
}

import static java.util.Arrays.*;
import java.util.*;
import java.io.*;

public class a {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        for (int base = 2; base < n; ++base) {
            int aa = n;
            while (aa != 0) {
                // please pay attention to the order
                sum += aa % base;
                aa = aa / base;
            }
        }
        int d = gcd(sum, n - 2);
        System.out.printf("%d/%d", sum / d, (n - 2 )/ d);

    }

    public static int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a % b);
    }
}

import java.io.*;
import java.util.*;

public class Numbers {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(f.readLine());
        int m = 0;
        int n = a-2;
        for (int b = 2; b < a; b++)
        {
            int x = a;
            while (x > 0)
            {
                m += x % b;
                x /= b;
            }
        }
        int g = gcd(m,n);
        m /= g;
        n /= g;
        System.out.println(m+"/"+n);
    }

    public static int gcd(int a, int b)
    {
        if (b == 0)
            return a;
        return gcd(b, a%b);
    }
}

import java.io.*;
import java.util.*;
import java.math.*;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int sum = 0;
        for(int b = 2; b < a; ++b) {
            int t = a;
            while (t > 0) {
                sum += t % b;
                t /= b;
            }
        }
        BigInteger A = BigInteger.valueOf(sum);
        BigInteger B = BigInteger.valueOf(a - 2);
        BigInteger g = A.gcd(B);
        System.out.println(A.divide(g) + "/" + B.divide(g));
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class Numbers {

	static BufferedReader IN;
	static {
		try {
//			IN = new BufferedReader(new FileReader(new File(A.class.getResource("t.txt").toURI())));
			IN = new BufferedReader(new InputStreamReader(System.in));
		}
		catch(Exception e) {
			e.printStackTrace();
		}
	}

	static String inStr() {
		try {
			return IN.readLine();
		} catch (IOException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
	}
	static int inInt() { return Integer.parseInt(inStr()); }

	static int[] inIntArr() {
		String s = inStr();
		if(s == null)
			return null;
		return toIntArr(s);
	}
	static int[] toIntArr(String s) {
		String[] sArr = s.split(" ");
		int[] iArr = new int[sArr.length];
		for(int i = 0; i < sArr.length; ++i)
			iArr[i] = Integer.parseInt(sArr[i]);
		return iArr;
	}
	static void out(String s) { System.out.println(s); }
	static void out(int i) { out(Integer.toString(i)); }
	static void out(double x) {
		out(format(x));
	}
	static final DecimalFormat df = new DecimalFormat("0.000000");
	private static String format(double x) {
		String s = df.format(x);
		s = s.replaceAll(",", ".");
		return s;
	}

	static int[] sieve(int n) {
		Set<Integer> nonPrimes = new HashSet<Integer>();
		for(int i = 2; i <= n; ++i) {
			int p = i + i;
			while(p <= n) {
				nonPrimes.add(Integer.valueOf(p));
				p += i;
			}
		}

		int[] primes = new int[n - nonPrimes.size() - 1];
		int index = 0;
		for(int i = 2; i <= n; ++i) {
			if(!nonPrimes.contains(Integer.valueOf(i))) {
				primes[index++] = i;
				//System.out.println(i);
			}
		}
		return primes;
	}

	static int[] shorten(int n, int d) {
		int[] shortened = shortenOnce(n, d);
		while(shortened[0] != n) {
			n = shortened[0];
			d = shortened[1];
			shortened = shortenOnce(n, d);
		}
		return shortened;
	}

	static int[] shortenOnce(int n, int d) {
		int largestCommonDivisor = 0;

		for(int i = n; i > 1; --i) {
			if(n % i == 0 && d % i == 0) {
				largestCommonDivisor = i;
				break;
			}
		}

		if(largestCommonDivisor == 0)
			return new int[] {n , d};
		else
			return new int[] {n/largestCommonDivisor, d/largestCommonDivisor};
	}

	public static void main(String[] args) {
		int A = inInt();

		int totalSum = 0;
		for(int b = 2; b < A; ++b) {

			int pow = 0;
			int bPow = 1;
			while(bPow <= A) {
				bPow *= b;
				++pow;
			}
			bPow /= b;
			--pow;

//			out("b = " + b + ", pow = " + pow + ", bPow = " + bPow);

			int a = A;
			while(pow >= 0) {

				totalSum += a/bPow;
				a = a%bPow;

				bPow /= b;
				--pow;
			}
		}
		int[] answer = shorten(totalSum, A - 2);
		out(answer[0] + "/" + answer[1]);
	}

}

import java.io.*;
import java.util.*;
public class cf13A {

	public static int gcd(int a,int b) {
		if(a == 0)
			return b;

		return gcd(b%a,a);
	}
	public static void main(String[] args) throws Exception {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		//Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(br.readLine());
		int base = 2;
		int sum = 0;
		while(base < n)
		{
			//System.out.println("IN LOOP1");
			int a = n;
			while(a > 0)
			{
				//System.out.println("IN LOOP2");
				sum += a%base;
				a/=base;
			}
			base++;
		}
		System.out.println((sum/gcd(sum,n-2))+"/"+((n-2)/gcd(sum,n-2)));
	}
}

import java.util.*;
import java.math.*;
import java.io.*;
public class LOL {
    static int gcd(int a, int b) {
        return b==0 ? a : gcd(b,a%b);
    }
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int num = 0;
        int den = 0;
        for (int b=2; b<N; b++) {
            int cur = N;
            int sum = 0;
            while(cur > 0) {
                sum += cur%b;
                cur /= b;
            }
            num += sum;
            den++;
        }
        int g = gcd(num,den);
        System.out.printf("%d/%d",num/g,den/g);
    }
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Trung Pham
 */
public class A {

    public static void main(String[] args) throws FileNotFoundException, IOException {
        Scanner in = new Scanner();
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        int result = 0;
        for (int i = 2; i < n; i++) {
            result += cal(i, n);
        }
        int de = n - 2;
        int d = gcd(result, de);
        out.println(result / d + "/" + de / d);
        out.close();
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static int cal(int base, int val) {
        int result = 0;
        while (val > 0) {
            result += val % base;
            val /= base;
        }
        return result;
    }

    static class FT {

        int[] data;

        FT(int n) {
            data = new int[n];
        }

        void update(int index, int val) {
            // System.out.println("UPDATE INDEX " + index);
            while (index < data.length) {
                data[index] += val;
                index += index & (-index);

                //    System.out.println("NEXT " +index);
            }
        }

        int get(int index) {
            //  System.out.println("GET INDEX " + index);
            int result = 0;
            while (index > 0) {
                result += data[index];
                index -= index & (-index);
                // System.out.println("BACK " + index);
            }
            return result;
        }
    }

    static class Pair implements Comparable<Pair> {

        int a, b, c;

        public Pair(int a, int b, int c) {
            this.a = a;
            this.b = b;
            this.c = c;
        }

        @Override
        public int compareTo(Pair o) {
            return b - o.b;
        }
    }

    static int pow(int a, int b) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        int val = pow(a, b / 2);
        if (b % 2 == 0) {

            return val * val;
        } else {
            return val * val * a;
        }
    }

//    static Point intersect(Point a, Point b, Point c) {
//        double D = cross(a, b);
//        if (D != 0) {
//            return new Point(cross(c, b) / D, cross(a, c) / D);
//        }
//        return null;
//    }
//
//    static Point convert(Point a, double angle) {
//        double x = a.x * cos(angle) - a.y * sin(angle);
//        double y = a.x * sin(angle) + a.y * cos(angle);
//        return new Point(x, y);
//    }
    static Point minus(Point a, Point b) {
        return new Point(a.x - b.x, a.y - b.y);
    }

    static Point add(Point a, Point b) {
        return new Point(a.x + b.x, a.y + b.y);
    }

    static double cross(Point a, Point b) {
        return a.x * b.y - a.y * b.x;
    }

    static class Point {

        int x, y;

        Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public String toString() {
            return "Point: " + x + " " + y;
        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            //System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            //   br = new BufferedReader(new FileReader("input.txt"));
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

/*
 * Hello! You are trying to hack my solution, are you? =)
 * Don't be afraid of the size, it's just a dump of useful methods like gcd, or n-th Fib number.
 * And I'm just too lazy to create a new .java for every task.
 * And if you were successful to hack my solution, please, send me this test as a message or to Abrackadabraa@gmail.com.
 * It can help me improve my skills and i'd be very grateful for that.
 * Sorry for time you spent reading this message. =)
 * Good luck, unknown rival. =)
 * */

import java.io.*;
import java.math.*;
import java.util.*;

public class Abra {
	void solve() throws IOException {
		int a = nextInt(), c = 0;
		int ch = 0, zn = 0;
		for (int i = 2; i < a; i++) {
			int t = a;
			while (t > 0) {
				ch += t % i;
				t /= i;
			}
			zn++;
		}
		fraction f = new fraction(ch, zn);
		f.reduce();
		out.println(f);
	}

	public static void main(String[] args) throws IOException {
		new Abra().run();
	}

	StreamTokenizer in;
	PrintWriter out;
	boolean oj;
	BufferedReader br;

	void init() throws IOException {
		oj = System.getProperty("ONLINE_JUDGE") != null;
		Reader reader = oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
		Writer writer = oj ? new OutputStreamWriter(System.out) : new FileWriter("output.txt");
		br = new BufferedReader(reader);
		in = new StreamTokenizer(br);
		out = new PrintWriter(writer);
	}

	long selectionTime = 0;

	void startSelection() {
		selectionTime -= System.currentTimeMillis();
	}

	void stopSelection() {
		selectionTime += System.currentTimeMillis();
	}

	void run() throws IOException {
		long beginTime = System.currentTimeMillis();
		long beginMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		init();
		solve();
		long endMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
		long endTime = System.currentTimeMillis();
		if (!oj) {
			System.out.println("Memory used = " + (endMem - beginMem));
			System.out.println("Total memory = " + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()));
			System.out.println("Running time = " + (endTime - beginTime));
		}
		out.flush();
	}

	int nextInt() throws IOException {
		in.nextToken();
		return (int) in.nval;
	}

	int fastNextInt() throws IOException {
		int r = 0, d = 1;
		char c = (char) br.read();
		while (!lib.isDigitChar(c) && c != '-')
			c = (char) br.read();
		while (true) {
			if (c == '-') {
				d = -1;
			} else {
				r += (c - '0') * d;
				d *= 10;
			}
			c = (char) br.read();
			if (!lib.isDigitChar(c) && c != '-') break;
		}
		return r;
	}

	long nextLong() throws IOException {
		in.nextToken();
		return (long) in.nval;
	}

	String nextString() throws IOException {
		in.nextToken();
		return in.sval;
	}

	double nextDouble() throws IOException {
		in.nextToken();
		return in.nval;
	}

	myLib lib = new myLib();

	static class myLib {
		long fact(long x) {
			long a = 1;
			for (long i = 2; i <= x; i++) {
				a *= i;
			}
			return a;
		}

		long digitSum(String x) {
			long a = 0;
			for (int i = 0; i < x.length(); i++) {
				a += x.charAt(i) - '0';
			}
			return a;
		}

		long digitSum(long x) {
			long a = 0;
			while (x > 0) {
				a += x % 10;
				x /= 10;
			}
			return a;
		}

		long digitMul(long x) {
			long a = 1;
			while (x > 0) {
				a *= x % 10;
				x /= 10;
			}
			return a;
		}

		int digitCubesSum(int x) {
			int a = 0;
			while (x > 0) {
				a += (x % 10) * (x % 10) * (x % 10);
				x /= 10;
			}
			return a;
		}

		double pif(double ax, double ay, double bx, double by) {
			return Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
		}

		double pif3D(double ax, double ay, double az, double bx, double by, double bz) {
			return Math.sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by) + (az - bz) * (az - bz));
		}

		double pif3D(double[] a, double[] b) {
			return Math.sqrt((a[0] - b[0]) * (a[0] - b[0]) + (a[1] - b[1]) * (a[1] - b[1]) + (a[2] - b[2]) * (a[2] - b[2]));
		}

		long gcd(long a, long b) {
			if (a == 0 || b == 0) return 1;
			if (a < b) {
				long c = b;
				b = a;
				a = c;
			}
			while (a % b != 0) {
				a = a % b;
				if (a < b) {
					long c = b;
					b = a;
					a = c;
				}
			}
			return b;
		}

		int gcd(int a, int b) {
			if (a == 0 || b == 0) return 1;
			if (a < b) {
				int c = b;
				b = a;
				a = c;
			}
			while (a % b != 0) {
				a = a % b;
				if (a < b) {
					int c = b;
					b = a;
					a = c;
				}
			}
			return b;
		}

		long lcm(long a, long b) {
			return a * b / gcd(a, b);
		}

		int lcm(int a, int b) {
			return a * b / gcd(a, b);
		}

		int countOccurences(String x, String y) {
			int a = 0, i = 0;
			while (true) {
				i = y.indexOf(x);
				if (i == -1) break;
				a++;
				y = y.substring(i + 1);
			}
			return a;
		}

		int[] findPrimes(int x) {
			boolean[] forErato = new boolean[x - 1];
			List<Integer> t = new Vector<Integer>();
			int l = 0, j = 0;
			for (int i = 2; i < x; i++) {
				if (forErato[i - 2]) continue;
				t.add(i);
				l++;
				j = i * 2;
				while (j < x) {
					forErato[j - 2] = true;
					j += i;
				}
			}
			int[] primes = new int[l];
			Iterator<Integer> iterator = t.iterator();
			for (int i = 0; iterator.hasNext(); i++) {
				primes[i] = iterator.next().intValue();
			}
			return primes;
		}

		int rev(int x) {
			int a = 0;
			while (x > 0) {
				a = a * 10 + x % 10;
				x /= 10;
			}
			return a;
		}

		class myDate {
			int d, m, y;

			int[] ml = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

			public myDate(int da, int ma, int ya) {
				d = da;
				m = ma;
				y = ya;
				if ((ma > 12 || ma < 1 || da > ml[ma - 1] || da < 1) && !(d == 29 && m == 2 && y % 4 == 0)) {
					d = 1;
					m = 1;
					y = 9999999;
				}
			}

			void incYear(int x) {
				for (int i = 0; i < x; i++) {
					y++;
					if (m == 2 && d == 29) {
						m = 3;
						d = 1;
						return;
					}
					if (m == 3 && d == 1) {
						if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) {
							m = 2;
							d = 29;
						}
						return;
					}
				}
			}

			boolean less(myDate x) {
				if (y < x.y) return true;
				if (y > x.y) return false;
				if (m < x.m) return true;
				if (m > x.m) return false;
				if (d < x.d) return true;
				if (d > x.d) return false;
				return true;
			}

			void inc() {
				if ((d == 31) && (m == 12)) {
					y++;
					d = 1;
					m = 1;
				} else {
					if (((y % 4 == 0) && (y % 100 != 0)) || (y % 400 == 0)) {
						ml[1] = 29;
					}
					if (d == ml[m - 1]) {
						m++;
						d = 1;
					} else
						d++;
				}
			}
		}

		int partition(int n, int l, int m) {// n - sum, l - length, m - every
											// part
			// <= m
			if (n < l) return 0;
			if (n < l + 2) return 1;
			if (l == 1) return 1;
			int c = 0;
			for (int i = Math.min(n - l + 1, m); i >= (n + l - 1) / l; i--) {
				c += partition(n - i, l - 1, i);
			}
			return c;
		}

		int rifmQuality(String a, String b) {
			if (a.length() > b.length()) {
				String c = a;
				a = b;
				b = c;
			}
			int c = 0, d = b.length() - a.length();
			for (int i = a.length() - 1; i >= 0; i--) {
				if (a.charAt(i) == b.charAt(i + d)) c++;
				else
					break;
			}
			return c;
		}

		String numSym = "0123456789ABCDEF";

		String ZFromXToYNotation(int x, int y, String z) {
			if (z.equals("0")) return "0";
			String a = "";
			// long q = 0, t = 1;
			BigInteger q = BigInteger.ZERO, t = BigInteger.ONE;
			for (int i = z.length() - 1; i >= 0; i--) {
				q = q.add(t.multiply(BigInteger.valueOf(z.charAt(i) - 48)));
				t = t.multiply(BigInteger.valueOf(x));
			}
			while (q.compareTo(BigInteger.ZERO) == 1) {
				a = numSym.charAt((int) (q.mod(BigInteger.valueOf(y)).intValue())) + a;
				q = q.divide(BigInteger.valueOf(y));
			}
			return a;
		}

		double angleFromXY(int x, int y) {
			if ((x == 0) && (y > 0)) return Math.PI / 2;
			if ((x == 0) && (y < 0)) return -Math.PI / 2;
			if ((y == 0) && (x > 0)) return 0;
			if ((y == 0) && (x < 0)) return Math.PI;
			if (x > 0) return Math.atan((double) y / x);
			else {
				if (y > 0) return Math.atan((double) y / x) + Math.PI;
				else
					return Math.atan((double) y / x) - Math.PI;
			}
		}

		static boolean isNumber(String x) {
			try {
				Integer.parseInt(x);
			} catch (NumberFormatException ex) {
				return false;
			}
			return true;
		}

		static boolean stringContainsOf(String x, String c) {
			for (int i = 0; i < x.length(); i++) {
				if (c.indexOf(x.charAt(i)) == -1) return false;
			}
			return true;
		}

		long pow(long a, long n) { // b > 0
			if (n == 0) return 1;
			long k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		int pow(int a, int n) { // b > 0
			if (n == 0) return 1;
			int k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		double pow(double a, int n) { // b > 0
			if (n == 0) return 1;
			double k = n, b = 1, c = a;
			while (k != 0) {
				if (k % 2 == 0) {
					k /= 2;
					c *= c;
				} else {
					k--;
					b *= c;
				}
			}
			return b;
		}

		double log2(double x) {
			return Math.log(x) / Math.log(2);
		}

		int lpd(int[] primes, int x) {// least prime divisor
			int i;
			for (i = 0; primes[i] <= x / 2; i++) {
				if (x % primes[i] == 0) {
					return primes[i];
				}
			}
			;
			return x;
		}

		int np(int[] primes, int x) {// number of prime number
			for (int i = 0; true; i++) {
				if (primes[i] == x) return i;
			}
		}

		int[] dijkstra(int[][] map, int n, int s) {
			int[] p = new int[n];
			boolean[] b = new boolean[n];
			Arrays.fill(p, Integer.MAX_VALUE);
			p[s] = 0;
			b[s] = true;
			for (int i = 0; i < n; i++) {
				if (i != s) p[i] = map[s][i];
			}
			while (true) {
				int m = Integer.MAX_VALUE, mi = -1;
				for (int i = 0; i < n; i++) {
					if (!b[i] && (p[i] < m)) {
						mi = i;
						m = p[i];
					}
				}
				if (mi == -1) break;
				b[mi] = true;
				for (int i = 0; i < n; i++)
					if (p[mi] + map[mi][i] < p[i]) p[i] = p[mi] + map[mi][i];
			}
			return p;
		}

		boolean isLatinChar(char x) {
			if (((x >= 'a') && (x <= 'z')) || ((x >= 'A') && (x <= 'Z'))) return true;
			else
				return false;
		}

		boolean isBigLatinChar(char x) {
			if (x >= 'A' && x <= 'Z') return true;
			else
				return false;
		}

		boolean isSmallLatinChar(char x) {
			if (x >= 'a' && x <= 'z') return true;
			else
				return false;
		}

		boolean isDigitChar(char x) {
			if (x >= '0' && x <= '9') return true;
			else
				return false;
		}

		class NotANumberException extends Exception {
			private static final long serialVersionUID = 1L;
			String mistake;

			NotANumberException() {
				mistake = "Unknown.";
			}

			NotANumberException(String message) {
				mistake = message;
			}
		}

		class Real {
			String num = "0";
			long exp = 0;
			boolean pos = true;

			long length() {
				return num.length();
			}

			void check(String x) throws NotANumberException {
				if (!stringContainsOf(x, "0123456789+-.eE")) throw new NotANumberException("Illegal character.");
				long j = 0;
				for (long i = 0; i < x.length(); i++) {
					if ((x.charAt((int) i) == '-') || (x.charAt((int) i) == '+')) {
						if (j == 0) j = 1;
						else
							if (j == 5) j = 6;
							else
								throw new NotANumberException("Unexpected sign.");
					} else
						if ("0123456789".indexOf(x.charAt((int) i)) != -1) {
							if (j == 0) j = 2;
							else
								if (j == 1) j = 2;
								else
									if (j == 2)
									;
									else
										if (j == 3) j = 4;
										else
											if (j == 4)
											;
											else
												if (j == 5) j = 6;
												else
													if (j == 6)
													;
													else
														throw new NotANumberException("Unexpected digit.");
						} else
							if (x.charAt((int) i) == '.') {
								if (j == 0) j = 3;
								else
									if (j == 1) j = 3;
									else
										if (j == 2) j = 3;
										else
											throw new NotANumberException("Unexpected dot.");
							} else
								if ((x.charAt((int) i) == 'e') || (x.charAt((int) i) == 'E')) {
									if (j == 2) j = 5;
									else
										if (j == 4) j = 5;
										else
											throw new NotANumberException("Unexpected exponent.");
								} else
									throw new NotANumberException("O_o.");
				}
				if ((j == 0) || (j == 1) || (j == 3) || (j == 5)) throw new NotANumberException("Unexpected end.");
			}

			public Real(String x) throws NotANumberException {
				check(x);
				if (x.charAt(0) == '-') pos = false;
				long j = 0;
				String e = "";
				boolean epos = true;
				for (long i = 0; i < x.length(); i++) {
					if ("0123456789".indexOf(x.charAt((int) i)) != -1) {
						if (j == 0) num += x.charAt((int) i);
						if (j == 1) {
							num += x.charAt((int) i);
							exp--;
						}
						if (j == 2) e += x.charAt((int) i);
					}
					if (x.charAt((int) i) == '.') {
						if (j == 0) j = 1;
					}
					if ((x.charAt((int) i) == 'e') || (x.charAt((int) i) == 'E')) {
						j = 2;
						if (x.charAt((int) (i + 1)) == '-') epos = false;
					}
				}
				while ((num.length() > 1) && (num.charAt(0) == '0'))
					num = num.substring(1);
				while ((num.length() > 1) && (num.charAt(num.length() - 1) == '0')) {
					num = num.substring(0, num.length() - 1);
					exp++;
				}
				if (num.equals("0")) {
					exp = 0;
					pos = true;
					return;
				}
				while ((e.length() > 1) && (e.charAt(0) == '0'))
					e = e.substring(1);
				try {
					if (e != "") if (epos) exp += Long.parseLong(e);
					else
						exp -= Long.parseLong(e);
				} catch (NumberFormatException exc) {
					if (!epos) {
						num = "0";
						exp = 0;
						pos = true;
					} else {
						throw new NotANumberException("Too long exponent");
					}
				}
			}

			public Real() {
			}

			String toString(long mantissa) {
				String a = "", b = "";
				if (exp >= 0) {
					a = num;
					if (!pos) a = '-' + a;
					for (long i = 0; i < exp; i++)
						a += '0';
					for (long i = 0; i < mantissa; i++)
						b += '0';
					if (mantissa == 0) return a;
					else
						return a + "." + b;
				} else {
					if (exp + length() <= 0) {
						a = "0";
						if (mantissa == 0) {
							return a;
						}
						if (mantissa < -(exp + length() - 1)) {
							for (long i = 0; i < mantissa; i++)
								b += '0';
							return a + "." + b;
						} else {
							if (!pos) a = '-' + a;
							for (long i = 0; i < mantissa; i++)
								if (i < -(exp + length())) b += '0';
								else
									if (i + exp >= 0) b += '0';
									else
										b += num.charAt((int) (i + exp + length()));
							return a + "." + b;
						}
					} else {
						if (!pos) a = "-";
						for (long i = 0; i < exp + length(); i++)
							a += num.charAt((int) i);
						if (mantissa == 0) return a;
						for (long i = exp + length(); i < exp + length() + mantissa; i++)
							if (i < length()) b += num.charAt((int) i);
							else
								b += '0';
						return a + "." + b;
					}
				}
			}
		}

		boolean containsRepeats(int... num) {
			Set<Integer> s = new TreeSet<Integer>();
			for (int d : num)
				if (!s.contains(d)) s.add(d);
				else
					return true;
			return false;
		}

		int[] rotateDice(int[] a, int n) {
			int[] c = new int[6];
			if (n == 0) {
				c[0] = a[1];
				c[1] = a[5];
				c[2] = a[2];
				c[3] = a[0];
				c[4] = a[4];
				c[5] = a[3];
			}
			if (n == 1) {
				c[0] = a[2];
				c[1] = a[1];
				c[2] = a[5];
				c[3] = a[3];
				c[4] = a[0];
				c[5] = a[4];
			}
			if (n == 2) {
				c[0] = a[3];
				c[1] = a[0];
				c[2] = a[2];
				c[3] = a[5];
				c[4] = a[4];
				c[5] = a[1];
			}
			if (n == 3) {
				c[0] = a[4];
				c[1] = a[1];
				c[2] = a[0];
				c[3] = a[3];
				c[4] = a[5];
				c[5] = a[2];
			}
			if (n == 4) {
				c[0] = a[0];
				c[1] = a[2];
				c[2] = a[3];
				c[3] = a[4];
				c[4] = a[1];
				c[5] = a[5];
			}
			if (n == 5) {
				c[0] = a[0];
				c[1] = a[4];
				c[2] = a[1];
				c[3] = a[2];
				c[4] = a[3];
				c[5] = a[5];
			}
			return c;
		}

		int min(int... a) {
			int c = Integer.MAX_VALUE;
			for (int d : a)
				if (d < c) c = d;
			return c;
		}

		int max(int... a) {
			int c = Integer.MIN_VALUE;
			for (int d : a)
				if (d > c) c = d;
			return c;
		}

		double maxD(double... a) {
			double c = Double.MIN_VALUE;
			for (double d : a)
				if (d > c) c = d;
			return c;
		}

		double minD(double... a) {
			double c = Double.MAX_VALUE;
			for (double d : a)
				if (d < c) c = d;
			return c;
		}

		int[] normalizeDice(int[] a) {
			int[] c = a.clone();
			if (c[0] != 0) if (c[1] == 0) c = rotateDice(c, 0);
			else
				if (c[2] == 0) c = rotateDice(c, 1);
				else
					if (c[3] == 0) c = rotateDice(c, 2);
					else
						if (c[4] == 0) c = rotateDice(c, 3);
						else
							if (c[5] == 0) c = rotateDice(rotateDice(c, 0), 0);
			while (c[1] != min(c[1], c[2], c[3], c[4]))
				c = rotateDice(c, 4);
			return c;
		}

		boolean sameDice(int[] a, int[] b) {
			for (int i = 0; i < 6; i++)
				if (a[i] != b[i]) return false;
			return true;
		}

		final double goldenRatio = (1 + Math.sqrt(5)) / 2;
		final double aGoldenRatio = (1 - Math.sqrt(5)) / 2;

		long Fib(int n) {
			if (n < 0) if (n % 2 == 0) return -Math.round((pow(goldenRatio, -n) - pow(aGoldenRatio, -n)) / Math.sqrt(5));
			else
				return -Math.round((pow(goldenRatio, -n) - pow(aGoldenRatio, -n)) / Math.sqrt(5));
			return Math.round((pow(goldenRatio, n) - pow(aGoldenRatio, n)) / Math.sqrt(5));
		}

		class japaneeseComparator implements Comparator<String> {
			@Override
			public int compare(String a, String b) {
				int ai = 0, bi = 0;
				boolean m = false, ns = false;
				if (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') {
					if (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') m = true;
					else
						return -1;
				}
				if (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') {
					if (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') m = true;
					else
						return 1;
				}
				a += "!";
				b += "!";
				int na = 0, nb = 0;
				while (true) {
					if (a.charAt(ai) == '!') {
						if (b.charAt(bi) == '!') break;
						return -1;
					}
					if (b.charAt(bi) == '!') {
						return 1;
					}
					if (m) {
						int ab = -1, bb = -1;
						while (a.charAt(ai) <= '9' && a.charAt(ai) >= '0') {
							if (ab == -1) ab = ai;
							ai++;
						}
						while (b.charAt(bi) <= '9' && b.charAt(bi) >= '0') {
							if (bb == -1) bb = bi;
							bi++;
						}
						m = !m;
						if (ab == -1) {
							if (bb == -1) continue;
							else
								return 1;
						}
						if (bb == -1) return -1;
						while (a.charAt(ab) == '0' && ab + 1 != ai) {
							ab++;
							if (!ns) na++;
						}
						while (b.charAt(bb) == '0' && bb + 1 != bi) {
							bb++;
							if (!ns) nb++;
						}
						if (na != nb) ns = true;
						if (ai - ab < bi - bb) return -1;
						if (ai - ab > bi - bb) return 1;
						for (int i = 0; i < ai - ab; i++) {
							if (a.charAt(ab + i) < b.charAt(bb + i)) return -1;
							if (a.charAt(ab + i) > b.charAt(bb + i)) return 1;
						}
					} else {
						m = !m;
						while (true) {
							if (a.charAt(ai) <= 'z' && a.charAt(ai) >= 'a' && b.charAt(bi) <= 'z' && b.charAt(bi) >= 'a') {
								if (a.charAt(ai) < b.charAt(bi)) return -1;
								if (a.charAt(ai) > b.charAt(bi)) return 1;
								ai++;
								bi++;
							} else
								if (a.charAt(ai) <= 'z' && a.charAt(ai) >= 'a') return 1;
								else
									if (b.charAt(bi) <= 'z' && b.charAt(bi) >= 'a') return -1;
									else
										break;
						}
					}
				}
				if (na < nb) return 1;
				if (na > nb) return -1;
				return 0;
			}
		}

		Random random = new Random();
	}

	void readIntArray(int[] a) throws IOException {
		for (int i = 0; i < a.length; i++)
			a[i] = nextInt();
	}

	String readChars(int l) throws IOException {
		String r = "";
		for (int i = 0; i < l; i++)
			r += (char) br.read();
		return r;
	}

	class fraction{
		long num = 0, den = 1;

		void reduce(){
			long d = lib.gcd(num, den);
			num /= d;
			den /= d;
		}

		fraction(long ch, long zn) {
			num = ch;
			den = zn;
			reduce();
		}

		fraction add(fraction t) {
			long nd = lib.lcm(den, t.den);
			fraction r = new fraction(nd / den * num + nd / t.den * t.num, nd);
			r.reduce();
			return r;
		}

		public String toString(){
			return num + "/" + den;
		}
	}

	/*
	 * class cubeWithLetters { String consts = "ЧКТФЭЦ"; char[][] letters = { {
	 * 'А', 'Б', 'Г', 'В' }, { 'Д', 'Е', 'З', 'Ж' }, { 'И', 'Л', 'Н', 'М' }, {
	 * 'О', 'П', 'С', 'Р' }, { 'У', 'Х', 'Щ', 'Ш' }, { 'Ы', 'Ь', 'Я', 'Ю' } };
	 *
	 * char get(char x) { if (consts.indexOf(x) != -1) return x; for (int i = 0;
	 * i < 7; i++) { for (int j = 0; j < 4; j++) { if (letters[i][j] == x) { if
	 * (j == 0) return letters[i][3]; else return letters[i][j - 1]; } } }
	 * return '!'; }
	 *
	 * void subrotate(int x) { char t = letters[x][0]; letters[x][0] =
	 * letters[x][3]; letters[x][3] = letters[x][2]; letters[x][2] =
	 * letters[x][1]; letters[x][1] = t; }
	 *
	 * void rotate(int x) { subrotate(x); char t; if (x == 0) { t =
	 * letters[1][0]; letters[1][0] = letters[2][0]; letters[2][0] =
	 * letters[3][0]; letters[3][0] = letters[5][2]; letters[5][2] = t;
	 *
	 * t = letters[1][1]; letters[1][1] = letters[2][1]; letters[2][1] =
	 * letters[3][1]; letters[3][1] = letters[5][3]; letters[5][3] = t; } if (x
	 * == 1) { t = letters[2][0]; letters[2][0] = letters[0][0]; letters[0][0] =
	 * letters[5][0]; letters[5][0] = letters[4][0]; letters[4][0] = t;
	 *
	 * t = letters[2][3]; letters[2][3] = letters[0][3]; letters[0][3] =
	 * letters[5][3]; letters[5][3] = letters[4][3]; letters[4][3] = t; } if (x
	 * == 2) { t = letters[0][3]; letters[0][3] = letters[1][2]; letters[1][2] =
	 * letters[4][1]; letters[4][1] = letters[3][0]; letters[3][0] = t;
	 *
	 * t = letters[0][2]; letters[0][2] = letters[1][1]; letters[1][1] =
	 * letters[4][0]; letters[4][0] = letters[3][3]; letters[3][3] = t; } if (x
	 * == 3) { t = letters[2][1]; letters[2][1] = letters[4][1]; letters[4][1] =
	 * letters[5][1]; letters[5][1] = letters[0][1]; letters[0][1] = t;
	 *
	 * t = letters[2][2]; letters[2][2] = letters[4][2]; letters[4][2] =
	 * letters[5][2]; letters[5][2] = letters[0][2]; letters[0][2] = t; } if (x
	 * == 4) { t = letters[2][3]; letters[2][3] = letters[1][3]; letters[1][3] =
	 * letters[5][1]; letters[5][1] = letters[3][3]; letters[3][3] = t;
	 *
	 * t = letters[2][2]; letters[2][2] = letters[1][2]; letters[1][2] =
	 * letters[5][0]; letters[5][0] = letters[3][2]; letters[3][2] = t; } if (x
	 * == 5) { t = letters[4][3]; letters[4][3] = letters[1][0]; letters[1][0] =
	 * letters[0][1]; letters[0][1] = letters[3][2]; letters[3][2] = t;
	 *
	 * t = letters[4][2]; letters[4][2] = letters[1][3]; letters[1][3] =
	 * letters[0][0]; letters[0][0] = letters[3][1]; letters[3][1] = t; } }
	 *
	 * public String toString(){ return "  " + letters[0][0] + letters[0][1] +
	 * "\n" + "  " + letters[0][3] + letters[0][2] + "\n" + letters[1][0] +
	 * letters[1][1] + letters[2][0] + letters[2][1] + letters[3][0] +
	 * letters[3][1] + "\n" + letters[1][3] + letters[1][2] + letters[2][3] +
	 * letters[2][2] + letters[3][3] + letters[3][2] + "\n" + "  " +
	 * letters[4][0] + letters[4][1] + "\n" + "  " + letters[4][3] +
	 * letters[4][2] + "\n" + "  " + letters[5][0] + letters[5][1] + "\n" + "  "
	 * + letters[5][3] + letters[5][2] + "\n"; } }
	 *
	 *
	 * Vector<Integer>[] a; int n, mc, c1, c2; int[] col;
	 *
	 * void wave(int x, int p) { for (Iterator<Integer> i = a[x].iterator();
	 * i.hasNext(); ) { int t = i.next(); if (t == x || t == p) continue; if
	 * (col[t] == 0) { col[t] = mc; wave(t, x); } else { c1 = x; c2 = t; } } }
	 *
	 * void solve() throws IOException {
	 *
	 * String s = "ЕПОЕЬРИТСГХЖЗТЯПСТАПДСБИСТЧК"; //String s =
	 * "ЗЬУОЫТВЗТЯПУБОЫТЕАЫШХЯАТЧК"; cubeWithLetters cube = new
	 * cubeWithLetters(); for (int x = 0; x < 4; x++) { for (int y = x + 1; y <
	 * 5; y++) { for (int z = y + 1; z < 6; z++) { cube = new cubeWithLetters();
	 * out.println(cube.toString()); cube.rotate(x);
	 * out.println(cube.toString()); cube.rotate(y);
	 * out.println(cube.toString()); cube.rotate(z);
	 * out.println(cube.toString()); out.print(x + " " + y + " " + z + " = ");
	 * for (int i = 0; i < s.length(); i++) { out.print(cube.get(s.charAt(i)));
	 * } out.println(); } } }
	 *
	 * int a = nextInt(), b = nextInt(), x = nextInt(), y = nextInt();
	 * out.print((lib.min(a / (x / lib.gcd(x, y)), b / (y / lib.gcd(x, y))) * (x
	 * / lib.gcd(x, y))) + " " + (lib.min(a / (x / lib.gcd(x, y)), b / (y /
	 * lib.gcd(x, y))) * (y / lib.gcd(x, y)))); }
	 */

}

import java.util.*;

public class Numbers13A
{
    public static int gcd(int x, int y)
    {
        while (y != 0)
        {
            int t = y;
            y = x % y;
            x = t;
        }
        return x;
    }

    public static void main(String[] args)
    {
        // Set up scanner
        Scanner sc = new Scanner(System.in);
        // System.out.println("Enter n");
        int n = sc.nextInt();

        int sum = 0;
        for (int i=2; i<n; i++)
        {
            int temp = n;
            while (temp > 0)
            {
                sum += temp%i;
                temp = temp/i;
            }
        }
        int divisor = gcd(sum, (n-2));
        int num = sum/divisor;
        int denom = (n-2)/divisor;
        System.out.println(num + "/" + denom);
    }
}

import java.math.BigInteger;
import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		int n = new Scanner(System.in).nextInt();
		int sum = 0;
		for(int i = 2; i < n; i++){
		    for (int nn = n; nn != 0; nn /= i) {
		        sum += nn % i;
		    }
		}
		int d = new BigInteger(""+sum).gcd(new BigInteger(""+(n-=2))).intValue();
		System.out.println(sum/d +"/"+n/d);
	}
}

import java.util.Scanner;

public class Number {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int a = 0;
        int mod = 0;
        Scanner in = new Scanner(System.in);
        a = Integer.parseInt(in.nextLine());
        int div = a;
        int counter = 0;

        for(int i=2 ; i<=(a-1) ; i++)
        {
            counter ++;
            while(a>0)
            {
                mod += a%i;
                a = a/i;
            }
            a=div;

        }
        int divisor = gcd(mod, counter);
        System.out.println(mod/divisor+"/"+counter/divisor);
    }

    public static int gcd(int a , int b)
    {
        if(b == 0)
        {
            return a;
        }
        else
        {
            int r = a%b;
            return gcd(b,r);
        }

    }

}

import java.util.*;
import java.math.*;
public class numbers{
	public static int[] memo, next;
	public static void main(String[] args){
		Scanner br = new Scanner(System.in);
		int n = br.nextInt();
		BigInteger num = new BigInteger(""+n);
		int sum = 0;
		for(int i = 2;i<n;i++){
			//String cur = num.toString(i);
			int temp = n;
			while(temp > 0){
				sum+=temp%i;
				temp/=i;
			}
		}
		int bottom = n-2;
		int g = gcd(sum, bottom);
		sum/=g;
		bottom/=g;
		System.out.println(sum+"/"+bottom);
	}
	public static int gcd(int a, int b){
		if(b == 0){
			return a;
		}
		return gcd(b, a%b);
	}
}

import java.util.Scanner;

public class Numbers {

    public static  int GCD(int a, int b)
    {
       if (b==0) return a;
       return GCD(b,a%b);
    }

    public static void main(String[] args) {
        Scanner s = new Scanner (System.in);
        int n = s.nextInt();
        int sum=0;
        int a;
        int guc;
        int den = n-2;
        for (int i=2;i<n;i++){
            a=n;
            while (a>0){
                sum += a%i;
                a /= i;
            }
        }
        guc = GCD(sum,den);
        /*int beg = Math.min(sum, n-2);
        for (int j=beg;j>=2;j--){
            if (sum%j==0 && den%j==0) {guc = j;break;}
        }*/
        System.out.println(sum/guc+"/"+den/guc);
    }

}

import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class BetaRound13_A implements Runnable {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws IOException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	@Override
	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new BetaRound13_A()).start();
	}

	void solve() throws IOException {
		int n = readInt();
		int a = 0, b = 0;
		for (int i = 2; i < n; i++) {
			b++;
			a += sum(n, i);
		}
		int g = gcd(a, b);
		a /= g;
		b /= g;
		out.print(a + "/" + b);
	}

	int sum(int a, int m) {
		int s = 0;
		while (a > 0) {
			s += (a % m);
			a /= m;
		}
		return s;
	}

	int gcd(int a, int b) {
		if (b == 0) return a;
		return gcd(b, a%b);
	}
}

import java.util.Scanner;

public class Number {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int sum = 0;

		for (int i = 2; i <= A - 1; i++) {
			sum += basesum(i, A);
		}
		int gcd = gcd(sum, A - 2);
		System.out.println(sum / gcd + "/" + ((A - 2) / gcd));
		sc.close();
	}

	public static long basesum(int i, int A) {
		int temp_sum = 0;
		while (A > 0) {
			temp_sum += (A % i);
			A /= i;
		}
		return temp_sum;
	}

	public static int gcd(int a, int b) {
		if (a == 0)
			return b;

		return gcd(b % a, a);
	}

}

import java.util.*;
public class number
{
    public static void main(String[] args)
    {
        helper a = new helper();
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int result = 0;
        int C = A;
        String res= "";
        int i = 2;
        for (i = 2; i < C; i++)
        {
            A = C;
            while(A >= i)
            {
                result = result+A%i;
                A = A - A%i;
                A = A/i;
            }
            result+=A;
        }
        int gc = a.gcd(result, C-2);
        result = result/gc;
        res = result+"/"+(C-2)/gc;

            System.out.println(res);

    }

}
class helper
{
    int gcd (int a, int b)
    {
        if (b == 0)
            return a;
        else
            return gcd (b, a % b);
    }
    int lcm(int a, int b)
    {
        return a / gcd(a, b) * b;
    }
}

import java.util.Scanner;
public class Problem13Abases {
    int sum = 0;
    int n = 0;
    int A = 0;
    public static void main(String[] args) {
        new Problem13Abases();
    }

    public int baseSum(int a, int base) {
        int answer = 0;
        while(true) {
            answer += a%base;
            a = a/base;
            if (a==0 && a%base == 0)
                break;
        }
        return answer;
    }
    public void divShort(int a, int b) {
        int i = 2;
        while(true) {
            if (a%i == 0 && b%i == 0) {
                a = a/i;
                b = b/i;
            } else {
                i++;
            }
            if (i>b/2)
                break;
        }
        System.out.println(a+"/"+b);
    }
    Problem13Abases() {
        Scanner scan = new Scanner(System.in);
        A = scan.nextInt();
        scan.close();
        int sum = 0;
        for (int i = 2; i<A; i++) {
            sum += baseSum(A,i);
            //System.out.println(baseSum(A,i));
        }
        n = A-2;
        this.divShort(sum, n);
        //System.out.println(sum+"/"+n);
    }
}

import java.util.Scanner;

public class Coj2 {

    static long gcd(long a, long b) {
        if (b % a == 0) return a;
        else return gcd(b % a, a);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long sum = 0;
        for (int i = 2; i < n; i++) {
            int temp=n;
            while(temp>0){
                sum+=temp%i;
                temp/=i;
            }
        }
        long GCD = gcd(sum, n - 2);
        long b = (n - 2) / GCD, a = sum / GCD;
        System.out.println(a + "/" + b);
    }

}

/**
 * Created by ankeet on 8/23/16.
 */
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A13 {

    static FastReader in = null;
    static PrintWriter out = null;

    public static long sumdigbase(int n, int b)
    {
        long sum = 0;
        while(n>0)
        {
            sum += n% b;
            n/=b;
        }
        return sum;
    }
    public static long gcd(long a, long b)
    {
        return b == 0? a  : gcd(b, a%b);
    }
    public static void solve()
    {
        int A = in.nextInt();
        long sum =0;
        long ct = 0;
        for(int i=2; i<A; i++)
        {
            sum+=sumdigbase(A, i);
            ct++;
        }
        long g = gcd(sum, ct);
        sum /= g;
        ct /=g;
        out.println(sum + "/" + ct);
    }

    public static void main(String[] args)
    {
        in = new FastReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
        out.close();

    }

    static class FastReader {

        BufferedReader read;
        StringTokenizer tokenizer;

        public FastReader(InputStream in)
        {
            read = new BufferedReader(new InputStreamReader(in));
        }

        public String next()
        {
            while(tokenizer == null || !tokenizer.hasMoreTokens())
            {
                try{
                    tokenizer = new StringTokenizer(read.readLine());
                }catch(Exception e){
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public String nextLine(){

            try
            {
                return read.readLine();
            }
            catch(Exception e)
            {
                throw new RuntimeException(e);
            }
        }
        public int nextInt()
        {
            return Integer.parseInt(next());
        }
        public long nextLong()
        {
            return Long.parseLong(next());
        }
        public double nextDouble()
        {
            return Double.parseDouble(next());
        }

        public int[] nextIntArr(int n)
        {
            int[] a = new int[n];
            for(int i=0; i<n; ++i)
            {
                a[i] = nextInt();
            }
            return a;
        }

        public long[] nextLongArr(int n)
        {
            long[] a = new long[n];
            for(int i=0; i<n; ++i)
            {
                a[i] = nextLong();
            }
            return a;
        }
    }

}

import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Collection;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class CF13A implements Runnable{

    public static void main(String args[]){
       new CF13A().run();
    }

    @Override
    public void run(){
        try{
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            tok = null;
            solve();
            in.close();
            out.close();

        }
        catch(IOException e){
            e.printStackTrace();
            System.exit(0);
        }
    }

    int nextInt()throws IOException{
        return Integer.parseInt(nextToken());
    }

    double nextDouble()throws IOException{
        return Double.parseDouble(nextToken());
    }

    long nextLong() throws IOException{
        return Long.parseLong(nextToken());
    }

    String nextToken()throws IOException{
        while(tok == null || !tok.hasMoreTokens()){
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;
    //////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////
    private void solve()throws IOException{
      int n = nextInt();
      int result = 0;
      for(int i = 2; i < n; i++){
          result += getSumOfBase(n, i);
      }
      int max = Math.max(result, n - 2);
      int min = Math.min(result, n - 2);
      int gcd = gcd(max, min);
      out.println( (result / gcd) + "/" + ((n - 2) / gcd) );
    }

    static int gcd(int m, int n){
        if(n == 0) return m;
        return gcd(n, m % n);
    }

    static int getSumOfBase(int number, int base){
        int ans = 0;
        while(number > 0){
            ans += number % base;
            number = number / base;
        }

        return ans;
    }
}

import java.io.*;

public class Main {

	public static void main(String args[]) {

		try {
		     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		       int num = Integer.parseInt(br.readLine());

		long total = 0;
		       for (int i=2;i<num;i++) {
			       int temp = num;
			       while(temp != 0) {

			        total += temp % i;
			        temp /= i;
			}
		       }

		long nom = total;
		long denom = num -2;

		for (long i=2;i<=denom;i++) {
			while (nom % i == 0 && denom % i == 0) {
				nom /= i;
				denom /= i;
			}
		}

	//	if ( denom == 1) {
	//		System.out.println(nom);

	//	} else {

		System.out.println(nom+"/"+denom);
	//	}

		} catch (IOException e) {

		}

	}
}

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int A = in.nextInt();
        int sum = 0;
        for (int i = 2; i < A; i++) {
            int a = A;
            while (a > 0) {
                sum += (a % i);
                a /= i;
            }
        }
        int gcd = gcd(sum, A - 2);
        out.println(sum / gcd + "/" + (A - 2) / gcd);
    }

    private int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a % b);
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
        tokenizer = null;
    }

    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 int nextInt() {
        return Integer.parseInt(next());
    }

}

import java.util.Scanner;

public class Numbers {
    static long gcd(long num1, long num2) {
        if(num1 % num2 == 0) {
            return num2;
        }
        return gcd(num2, num1%num2);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int numBases = n-2;
        long sum = 0;
        for(int i = 2; i < n; ++i) {
            int tmp = n;
            while (tmp > 0) {
                int digit = tmp % i;
                sum += digit;
                tmp /= i;
            }
        }
        long gcd = gcd(sum, numBases);
        sum /= gcd;
        numBases /= gcd;
        System.out.println(sum+"/"+numBases);
    }
}

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = n;
        int b = 2;
        int x = 0;
        int y = n - 2;
        for(int i=2; i<n; i++) {
            while(k >= i) {
                x += k % i;
                k /= i;
            }
            x += k;
            k = n;
        }
        while(b < x && b < y) {
	    if(x % b == 0 && y % b == 0) {
                x /= b;
                y /= b;
            }
            else {
                b++;
            }
        }
        System.out.println(x + "/" + y);
    }
}

//by Nick Buelich
import java.util.*;
import java.io.*;

public class x13A{
	public static void main(String[] args)throws IOException{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int total=0;
		for(int a=2;a<n;a++){
			int q=n;
			while (q!=0){
				total+=(q%a);
				q/=a;
			}
		}
		int j=0;int k=0;
		j=total/GCD(total,n-2);
		k=(n-2)/GCD(total,n-2);
		System.out.printf("%d/%d", j,k);
	}
	static int GCD(int a, int b){
		if(b==0)return a;
		return GCD(b,a%b);
	}
}

import java.util.*;
public class Numbers {
	public static void main(String[] args){
		Scanner reader = new Scanner(System.in);
		int a = reader.nextInt();
		int sum = 0;
		for(int i = 2; i <= a-1; i++){
			int x = a;
			while(x > 0){
				sum += x%i;
				x /= i;
			}
		}
		int g = gcd(sum,a-2);
		System.out.println((sum/g)+"/"+(a-2)/g);
	}
	public static int gcd(int a, int b){
		return b==0?a:gcd(b,a%b);
	}
}

import java.util.*;
public class Main {

   public static int gcd(int a,int b)
        {
            if(a==0)
            {
                return b;
            }
            return gcd(b%a,a);
        }

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int sum=0,m=0;
        for(int i=2;i<n;i++)
        {
            int k=n;
            while(k!=0)
            {
                sum=sum+(k%i);
                k=k/i;
            }
            m++;
        }
        System.out.println(sum/gcd(sum,m)+"/"+m/gcd(sum,m));

    }
}

import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args) throws java.lang.Exception {
		BufferedReader kek = new BufferedReader(new InputStreamReader(System.in));
		//Scanner skek = new Scanner(System.in);
		PrintWriter outkek = new PrintWriter(System.out);

		int N = Integer.parseInt(kek.readLine());
		int res1 = 0, res2 = (N - 2);

		for(int i = 2; i < N; i++){
			int tracker = N;
			while(tracker != 0){
				res1 += tracker % i;
				tracker /= i;
			}
		}

		int temp1 = res1, temp2 = res2;

		if(temp2 != 0){
			while(temp2 != 0){
				int temp3 = temp1;
				temp1 = temp2;
				temp2 = temp3 % temp2;
			}
		}
		int finDivsor = temp1;
		res1 /= finDivsor;
		res2 /= finDivsor;

		outkek.println(res1 + "/" + res2);

		kek.close();
		outkek.close();
	}

}

 import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner in=new Scanner(System.in);
        long num,i,temp,sum=0,gcd;
        num=in.nextLong();
        for(i=2;i<=num-1;++i)
        {//模拟一遍从2到num-1进制的转换
        temp=num;
        while(temp!=0)
        {
            sum+=temp%i;//计算每一位
            temp/=i;
        }

        }
        num-=2;
        gcd=GCD(sum,num);
        sum/=gcd;
        num/=gcd;
        System.out.print(sum+"/"+num);
    }
    public static  long GCD(long  num1,long  num2)
    {
        return num2==0?num1:GCD(num2,num1%num2);
    }
}

import java.util.*;
import java.util.Map.Entry;

public class test {

	static int fraction(int sum, int val) {
		if(sum==0)
			return val;
		else
			return fraction(val%sum, sum);
	}

    public static void main(String[] args) {

    	Scanner sc=new Scanner(System.in);
    	int n=sc.nextInt();
    	int sum=0;
    	/*for(int i=2;i<n;i++) {
        	String s1=Integer.toString(Integer.parseInt(s,10),i);
        	System.out.println(s1);
        	for(int j=0;j<s1.length();j++) {
            	int x=(int)s1.charAt(j);
            	if(x<65) {
            		sum+=(Integer.parseInt(""+s1.charAt(j)));
            	}
        	}
        	cnt++;
    	}*/
    	for(int i=2;i<n;i++) {
        	int num=n;
	    	while(num>0) {
	    		sum+=num%i;
	    		num/=i;
	    	}
    	}
    	int fr=fraction(sum,n-2);

    	System.out.println(sum/fr+"/"+(n-2)/fr);
    }
}

import java.math.BigInteger;
import java.util.Scanner;

public class ProblemA {

    void run(){
           Scanner sc = new Scanner(System.in);
           int a=sc.nextInt();
           int res=0;
           for (int i=2;i<a;i++){
               res+=other(a,i);
           }
           BigInteger t1=BigInteger.valueOf(res);
           BigInteger t2=BigInteger.valueOf(a-2);
           BigInteger gcd=t1.gcd(t2);
           while(!gcd.equals(BigInteger.valueOf(1))){
               t1=t1.divide(gcd);
               t2=t2.divide(gcd);
               gcd=t1.gcd(t2);
           }
           System.out.println(t1+"/"+t2);
           sc.close();
    }

    public int other(int v,int d){
        int res=0;
        while (v>=d){
            res+=v%d;
            v=v/d;
        }
        res+=v;
        return res;
    }

    public static void main(String[] args) {
        new  ProblemA().run();
    }
}

import java.util.Scanner;
import java.util.HashMap;
import java.util.Arrays;
import java.util.Collections;

public class main{
    public static void main(String []args){
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int sum = 0;
        for(int i = 2;i<n;i++){
            sum += findSum(i,n);
        }
        int gcd = findGcd(sum,n-2);
        System.out.println(sum/gcd+"/"+(n-2)/gcd);
    }

    public static int findSum(int b,int n){
        int sum = 0;
        while(n!=0){
            sum+=n%b;
            n /= b;
        }
        return sum;
    }

    public static int findGcd(int a,int b){
        if(b==0) return a;
        return findGcd(b,a%b);
    }
}

import java.util.Scanner;

public class base{
	public static void main (String[] args) {
	Scanner entrada = new Scanner(System.in);
	int total=0, residuo, numero;

	numero = entrada.nextInt();
	int auxiliar=0;
	Operaciones obj = new Operaciones(1,1);
	for(int i=2; i<=numero-1; i++){
		obj = new Operaciones(numero,i);
		obj.transformar();
		total = total + obj.getResultado();
		auxiliar++;
	}

	System.out.println(obj.simplificar(total,auxiliar));
	}
}
class Operaciones
{
int equivalente;
int posicion;
int numero;
int base;
int[] digitos;
int[] auxiliar;

        public Operaciones(int n, int b)
        {
                posicion = 0;
                equivalente = 0;
                base = b;
                numero = n;
                digitos = new int [1];
        }

        public void transformar()
        {
                if(numero<base)
                {
                        digitos[posicion]=numero;
                        tamano();
                }
                else
                {
                        digitos[posicion]=numero%base;
                        tamano();
                        posicion++;
                        numero = numero/base;
                        transformar();
                 }
        }

        public int getResultado()
        {
                for (int j = digitos.length-2; j >= 0; j--)
                {
                        equivalente+=digitos[j];
                }
                return equivalente;
        }

        private void tamano()
        {
                 auxiliar = digitos;
                 digitos = new int [auxiliar.length+1];
                 System.arraycopy(auxiliar, 0, digitos, 0, auxiliar.length);
        }
		 private int mcd(int num, int den){
		 int u=Math.abs(num);
		 int v=Math.abs(den);
		 if(v==0){
			  return u;
		}
		 int r;
		 while(v!=0){
			  r=u%v;
			  u=v;
			  v=r;
		 }
		 return u;
		}

  public String simplificar(int num, int den){
     int dividir=mcd(num, den);
     num/=dividir;
     den/=dividir;
     return num+"/"+den;
  }
}

import java.util.Scanner;

public class a13 {

	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);

		int a = in.nextInt();

		int sum = 0;
		for(int i = 2; i <= a-1; i++)
			sum+=getSumInBase(a,i);

		int denom = a-2;
		int gcd = gcd(sum,denom);
		System.out.printf("%d/%d\n", sum/gcd, denom/gcd);
	}

	public static int getSumInBase(int num, int b)
	{
		int ans = 0;
		while(num!=0)
		{
			ans+=num%b;
			num/=b;
		}
		return ans;
	}

	public static int gcd(int a, int b)
	{
		return (b==0)?a:gcd(b,a%b);
	}
}

import java.util.Scanner;

public class p13a {
    public static long GCD(long a , long b) {
        if (b==0) return a;
           return GCD(b,a%b);
    }
    public static long convertInt(int x , int base) {
        if(x == 0)
            return 0;
        long res =0;
        int now = x;
        while(true)
        {
            if(now == 0)
                break;
            int rem = now%base;
            now /= base;
            res = rem + res;
        }
        return res;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        long res = 0;
        for (int i = 2; i < n; i++) {
            res += convertInt(n, i);
        }
        long g = GCD(res , n-2);
        System.out.println(res/g+"/"+(n-2)/g);
    }
}

import java.util.Scanner;

public class C13A {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);

		int a = in.nextInt();
		int sum = 0;

		for (int i = 2; i < a; i++)
			sum += sum(a, i);

		System.out.println(toString(sum, a - 2));

	}

	static int sum(int a, int n) {
		int sum = 0;

		while (a > 0) {
			sum += a % n;
			a /= n;
		}

		return sum;
	}

	static String toString(int a, int b) {
		int min = Math.min(a, b);
		for (int i = 2; i <= min; i++)
			while (a % i == 0 && b % i == 0) {
				a /= i;
				b /= i;
			}

		return a + "/" + b;
	}

}

import java.util.*;
public class Bases {
	public static long res = 0;
	public static long gcd(long a, long b){ //b es el chico
		if(b > a) return gcd(b,a);
		if(b == 0) return a;
		else return gcd(b,a%b);
	}
        public static void add(int n, int i){
                while(n > 0){
                        res += n % i;
                        n = n/i;
                }
        }
	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		for(int i = 2; i <= n-1; i++){
			add(n,i);
		}
		long r = gcd(res,(n-2));
		System.out.printf("%d/%d\n",res/r,(n-2)/r);
		seer.close();
	}
}

//package codeforces;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.StreamTokenizer;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Codeforces {

    private int n(int a, int k) {
        int i = 0, sum = 0;
        while (a >= Math.pow(k, i)) {
            i++;
        }
        i--;
        while (a > 0) {
            int now = (int) a / (int) Math.pow(k, i);
            sum += now;
            a -= now * Math.pow(k, i);
            i--;
        }
        return (sum);
    }

    public void solve() throws IOException {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int sum = 0;
        for (int i = 2; i < a; i++) {
            sum += n(a, i);
        }
        int y = a - 2;
        for (int i = 2; i <= Math.min(sum, y); i++) {
            while (sum % i == 0 && y % i == 0) {
                sum /= i;
                y /= i;
            }
        }
        System.out.println(sum + "/" + y);
    }

    public static void main(String[] args) throws IOException {
        Codeforces cf = new Codeforces();
        cf.solve();
    }
}

class MyScanner {

    private StreamTokenizer st;

    public MyScanner(InputStream is) {
        st = new StreamTokenizer(new BufferedReader(new InputStreamReader(is)));
    }

    public int nextInt() throws IOException {
        st.nextToken();
        return ((int) st.nval);
    }

    public double nextDouble() throws IOException {
        st.nextToken();
        return (st.nval);
    }

    public String next() throws IOException {
        st.nextToken();
        if (st.ttype == StreamTokenizer.TT_WORD) {
            return (st.sval);
        } else {
            return ("not found");
        }
    }
}

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws FileNotFoundException, IOException {
		InputReader in = new InputReader(new BufferedInputStream(System.in));
		PrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(System.out)));
		TaskB solver = new TaskB();
		long t1 = System.currentTimeMillis();
		solver.solve(1, in, out);
		out.flush();
		long t2 = System.currentTimeMillis();
//		System.err.println(t2 - t1);
		out.close();

	}
}

class Circles {
	Pair point;
	double second;

	Circles(Pair point, double second) {
		this.point = point;
		this.second = second;
	}
}

class Pair implements Comparable<Pair> {
	int first;
	int second;
	long w;

	Pair(int first, int second, long w) {
		this.first = first;
		this.second = second;
		this.w = w;
	}

	@Override
	public int compareTo(Pair arg0) {
		// TODO Auto-generated method stub
		return Long.compare(w, arg0.w);
	}

}

class TaskB {

	int id[];
	int sz[];

	void solve(int testNumber, InputReader in, PrintWriter pw) {
		int n = in.nextInt();
		int cnt = 0;
		for (int i = 2; i <= n - 1; ++i) {
			String temp = convert(n, i);
			for (int j = 0; j < temp.length(); ++j)
				cnt += (temp.charAt(j) - '0');
		}

		pw.println(cnt + "/" + (n - 2));
	}

	String convert(int n, int b) {
		StringBuilder ans = new StringBuilder("");
		while (n > 0) {
			int t = n % b;
			ans.append(t);
			n /= b;
		}
		ans.reverse();
		return ans.toString();
	}

	long pow(int n, int m) {
		if (m == 0)
			return 1;
		long ans = pow(n, m / 2);
		ans = (ans * ans);
		if (m % 2 == 1) {
			ans = (ans * n);
		}
		return ans;
	}

	double pow(double n, int m) {
		if (m == 0)
			return 1;
		double ans = pow(n, m / 2);
		ans = (ans * ans);
		if (m % 2 == 1) {
			ans = (ans * n);
		}
		return ans;
	}
}

class InputReader {
	BufferedReader br;
	StringTokenizer st;

	public InputReader(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;

public class A13 {
	BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st = null;

	private void solution() throws IOException {
		int n = nextInt();
		int all=0;
		String ans="";
		for(int i=2;i<n;i++){
			ans+=Integer.toString(n, i);
			all++;
		}
		long res=0;
		for(int i=0;i<ans.length();i++){
			if(ans.charAt(i)=='9'){res+=9;}
			if(ans.charAt(i)=='8'){res+=8;}
			if(ans.charAt(i)=='7'){res+=7;}
			if(ans.charAt(i)=='6'){res+=6;}
			if(ans.charAt(i)=='5'){res+=5;}
			if(ans.charAt(i)=='4'){res+=4;}
			if(ans.charAt(i)=='3'){res+=3;}
			if(ans.charAt(i)=='2'){res+=2;}
			if(ans.charAt(i)=='1'){res+=1;}
		}
		for(int i=2;i<n;i++){
			if(res %i==0 && all%i==0){
				all/=i;
				res/=i;
				i--;
			}
		}
		System.out.println(res+"/"+all);
	}

	String nextToken() throws IOException {
		if (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(bf.readLine());
		}
		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	public static void main(String args[]) throws IOException {
		new A13().solution();
	}
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
;

import static com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.Int;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.stream.IntStream;
import static jdk.nashorn.internal.objects.Global.Infinity;
import static jdk.nashorn.internal.objects.Global.NaN;

/**
 *
 * @author george
 */
public class main {
 static boolean  isPrime(int n) {
    for(int i=2;i<n;i++) {
        if(n%i==0)
            return false;
    }
    return true;
}
static public class Princess{
 public int rate;public int beauty;public int intellect;public int richness;
 public Princess(int sum,int a,int b,int c){
  this.rate=sum;
  this.beauty=a;
  this.intellect=b;
  this.richness=c;
  }
 }

   public static void main (String []  args)
    {
 Scanner s=new Scanner(System.in);
       int n=s.nextInt();
        int sum=0;int temp=n;
        for (int i = 2; i < n; i++) {
            while(n!=0){
            sum+=n%i;
            n=n/i;
            }
            n=temp;
        }
        n=n-2;
       while((sum%2==0&&n%2==0)||(sum%3==0&&n%3==0)){
       if((sum%2==0&&n%2==0)){sum=sum/2;n=n/2;}
       else{sum=sum/3;n=n/3;}

       }
       System.out.print(sum);  System.out.print('/');  System.out.print(n);
    }

}

import java.util.ArrayList;
import java.util.Scanner;

public class Prob13A
{

    public static void main(String[] args)
    {

        Scanner scn = new Scanner(System.in);

        int count =0, res = 0, a = scn.nextInt();

        for(int i = 2; i < a; i++)
        {
            res += f(i,a);
            count++;
        }

        System.out.println(res + "/" + count);

    }

    private static int f(int i, int a) {
        ArrayList<Integer> list = new ArrayList<Integer>();

        int res;

        while(a >= i)
        {
            list.add(a % i);
            a = a / i;
        }

        list.add(a);

        res = 0;
        //System.out.print("\n" + i + ": ");
        for(Integer e : list) {res += e; System.out.print(e + " "); };

        return res;
    }

}

import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.Scanner;

/**
 * http://codeforces.com/problemset/problem/13/A
 *
 * Numbers
 *
 */
public class A13 {
	public static void main(String[] args) throws IOException {
		solveNumbers();
	}

	public static void solveNumbers()throws IOException{
		Scanner scan = new Scanner(new BufferedInputStream(System.in));
		int n = scan.nextInt();
		int numerator  = 0;
		for (int i = 2; i < n; i++) {
			int t = n;
			while(t > 0){
				numerator  += t%i;
				t = t / i;
			}
		}

		int denominator = n - 2;
		while(numerator % denominator == 0 && denominator!= 1){
			numerator /= denominator;
		}
		System.out.println(numerator + "/" + denominator);
	}
}

import java.util.*;
public class Bases {
	public static long res = 0;
	public static long gcd(long a, long b){ //b es el chico
		if(b > a) return gcd(b,a);
		if(b == 0) return a;
		else return gcd(b,a%b);
	}
        public static void add(int n, int i){
                while(n > 0){
                        res += n % i;
                        n = n/i;
                }
        }
	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		for(int i = 2; i <= n-2; i++){
			add(n,i);
		}
		long r = gcd(res,n);
		System.out.printf("%d/%d\n",res/r,(n-2)/r);
		seer.close();
	}
}

import java.io.IOException;
import java.util.Scanner;

public class thirteenA {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), s = 0, k = 0;
		for (int i = 2; i < a; i ++) {
			k = a;
			while (k > 0) {
				s = s + k % i;
				k = k / i;
			}
		}
		int r = a - 2;
		while (s % 2 == 0 && r % 2 == 0) {
			s = s / 2;
			r = r / 2;
		}
		System.out.println(s + "/" + r);
	}
}

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.util.StringTokenizer;

public class MyTask{

	public static void main(String args[]){
		OutputStream outputstream = System.out;
		InputStream inputstream = System.in;
		PrintWriter out = new PrintWriter(outputstream);
		InputReader in = new InputReader(inputstream);

		Solver s = new Solver(in, out);
		s.solve();

		out.close();
	}
}

class Solver{
	private InputReader in;
	private PrintWriter out;
	Solver(InputReader in, PrintWriter out){
		this.in = in;
		this.out = out;
	}

	private int Sum(int x, int base){
		int res =0;
		while (x>0){
			res = res+x%base;
			x = (int)x/base;
		}
		return res;
	}

	public void solve(){
		int n = in.nextInt(),
			sum=0;
		for (int i=2;i<=n-1;i++)
			sum += Sum(n,i);

		int sum2 = n-2;
		for (int i=2;i<=Math.max(sum2,sum);i++)
			if (sum%i==0 && sum2%i==0){
				sum /= i;
				sum2 /= i;
			}
		out.println(sum + "/" + sum2);
	}
}

class InputReader{
	private BufferedReader buf;
	private StringTokenizer tok;

	InputReader(InputStream in){
		buf = new BufferedReader(new InputStreamReader(in));
		tok = null;
	}

	public String next(){
		while (tok==null || !tok.hasMoreTokens())
			tok = new StringTokenizer(nextLine());
		return tok.nextToken();
	}

	public int nextInt(){
		return Integer.parseInt(next());
	}

	public long nextLong(){
		return Long.parseLong(next());
	}

	public String nextLine(){
		try{
			return buf.readLine();
		}catch (IOException e){
			throw new RuntimeException();
		}
	}

	public Double nextDouble(){
		return Double.parseDouble(next());
	}

	public Float nextFloat(){
		return Float.parseFloat(next());
	}
}

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner ss=new Scanner(System.in);
        //int t=ss.nextInt();
        //while(t-->0){
            int num=ss.nextInt();
            int sum=0;
            for(int i=2;i<num;i++){
                sum+=sumn(jinzhi(i,num));
            }
            System.out.println(sum+"/"+(num-2));
        }
    //}
    public static int pow(int num,int m){
        int sum=1;
        for(int i=0;i<m;i++){
            sum*=num;
        }
        return sum;
    }
    public static int jinzhi(int base,int num){
        int sum=0,n=0;
        do{
            sum+=(num%base)*pow(10,n);
            num/=base;
            n++;
        }while((num/base)!=0);
        sum+=(num%base)*pow(10,n);
        return sum;
    }
    public static int sumn(int num){
        int sum=0;
        while(num!=0){
            sum+=num%10;
            num/=10;
        }
        return sum;
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BNumbers
{
	static int base(int n , int b)
	{
		int sum = 0;
		while(n > 0)
		{
			int  d =n % b;
			n /= b;
			sum += sumD(d);
		}

		return sum;
	}
	static int sumD(int d)
	{
		int r = 0;
		while(d > 0)
		{
			r += d%10;
			d /= 10;
		}
		return r;
	}

	static int gcd(int n, int m)
	{
		if(m == 0)
			return n;
		return gcd(m,n%m);
	}

	public static void main(String[] args) throws NumberFormatException, IOException
	{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int sum = 0;
		for (int i = 2; i < n; i++)
		{
			sum += base(n, i);
		}
		int gcd = gcd(sum, n);

		sum /= gcd;
		int d = (n-2) / gcd;
		System.out.println(sum +"/"+ d);
	}
}

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        int a = new Scanner(System.in).nextInt();
        int sum = 0;
        for (int i = 2; i < a; i++) {
            int t = a;
            while (t > 0){
                int x = t%i;
                while (x >0){
                    sum += x%i;
                    x /= i;
                }
                t /= i;
            }
        }
        System.out.println(sum+"/"+(a-2));
    }
}

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws FileNotFoundException, IOException {
		InputReader in = new InputReader(new BufferedInputStream(System.in));
		PrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(System.out)));
		TaskB solver = new TaskB();
		long t1 = System.currentTimeMillis();
		solver.solve(1, in, out);
		out.flush();
		long t2 = System.currentTimeMillis();
//		System.err.println(t2 - t1);
		out.close();

	}
}

class Circles {
	Pair point;
	double second;

	Circles(Pair point, double second) {
		this.point = point;
		this.second = second;
	}
}

class Pair implements Comparable<Pair> {
	int first;
	int second;
	long w;

	Pair(int first, int second, long w) {
		this.first = first;
		this.second = second;
		this.w = w;
	}

	@Override
	public int compareTo(Pair arg0) {
		// TODO Auto-generated method stub
		return Long.compare(w, arg0.w);
	}

}

class TaskB {

	int id[];
	int sz[];

	void solve(int testNumber, InputReader in, PrintWriter pw) {
		int n = in.nextInt();
		int cnt = 0;
		for (int i = 2; i <= n - 1; ++i) {
			int num = n;
			while (num > 0) {
				int t = num % i;
				cnt += t;
				num /= i;
			}
		}

		pw.println(cnt + "/" + (n - 2));
	}

	String convert(int n, int b) {
		StringBuilder ans = new StringBuilder("");
		while (n > 0) {
			int t = n % b;
			ans.append(t);
			n /= b;
		}
		ans.reverse();
		return ans.toString();
	}

	long pow(int n, int m) {
		if (m == 0)
			return 1;
		long ans = pow(n, m / 2);
		ans = (ans * ans);
		if (m % 2 == 1) {
			ans = (ans * n);
		}
		return ans;
	}

	double pow(double n, int m) {
		if (m == 0)
			return 1;
		double ans = pow(n, m / 2);
		ans = (ans * ans);
		if (m % 2 == 1) {
			ans = (ans * n);
		}
		return ans;
	}
}

class InputReader {
	BufferedReader br;
	StringTokenizer st;

	public InputReader(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

import java.util.*;
import java.math.*;
public class numbers{
	public static int[] memo, next;
	public static void main(String[] args){
		Scanner br = new Scanner(System.in);
		int n = br.nextInt();
		BigInteger num = new BigInteger(""+n);
		int sum = 0;
		for(int i = 2;i<n;i++){
			String cur = num.toString(i);
			for(int j = 0;j<cur.length();j++){
				sum+=cur.charAt(j)-'0';
			}
		}
		int bottom = n-2;
		int g = gcd(sum, bottom);
		sum/=g;
		bottom/=g;
		System.out.println(sum+"/"+bottom);
	}
	public static int gcd(int a, int b){
		if(b == 0){
			return a;
		}
		return gcd(b, a%b);
	}
}

import java.util.*;

public class Numbers {

    static int sum(int num,int base){
        int s = 0;

        while(num!=0){
            int x = num/base;

            s += (num%base);

            num = x;
        }

        return s;
    }
  public static  void main(String args[]){

      Scanner s = new Scanner(System.in);
      int n = s.nextInt();
       int sum = 0;
      for(int i=2;i<n;i++){
          sum += sum(n,i);
      }
       int d = n-2;
      for(int i=2;i<=Math.sqrt(d);i++){
          if(sum%i == 0 && d%i == 0){
              sum = sum/i;
              d =  d/i;

          }
      }
      System.out.println(sum+"/"+d);

  }

}

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = n;
        int b = 2;
        int x = 0;
        int y = n / 2 + n % 2;
        for(int i=2; i<n; i++) {
            while(k >= i) {
                x += k % i;
                k /= i;
            }
            x += k;
            k = n;
        }
        while(b < x && b < y) {
            if(b % x == 0 && b % y == 0) {
                x /= b;
                y /= b;
            }
            else {
                b++;
            }
        }
        System.out.println(x + "/" + y);
    }
}

import java.io.*;
import java.util.*;

public class Solution13A
{
    public static void main(String[] args) throws IOException
    {
        BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(inp.readLine());
        int A = Integer.parseInt(st.nextToken());
        int count = 0;
        for(int j = 2; j <= A - 1; j++)
        {
            int AA = A;
            while(AA >= j)
            {
                count += AA % j;
                AA = AA / j;
            }
            count += AA;
        }
        int p = A - 2;
        for(int i = 2; i < Math.min(count, p); i++)
        while(count % 2 == 0 && p == 0)
        {
            count /= i;
            p /= i;
        }
        System.out.println(count + "/" + p);
    }
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Solution {
    public static void main (String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int a = in.nextInt();
        int sum = 0;
        for (int i = 2; i < a; i++) {
        	int x = a;
        	while (x > 0) {
        		sum += x % i;
        		x /= i;
        	}
        }
    	System.out.println(sum + "/" + (a - 2));
        in.close();
    }
}

import java.util.Scanner;

public class Numbers {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		final int a = s.nextInt();
		System.out.println(new Numbers().execute(a));
	}

	public String execute(int a) {
		int sum = 0;
		for (int base = 2; base < a; base++) {
			sum += sum(a, base);
		}
		return "" + sum + "/" + (a - 2);
	}

	private int sum(int a, int base) {
		int sum = 0;
		for (int x = a; x > 0; x /= base) {
			sum += x % base;
		}
		return sum;
	}
}

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

    Scanner in;
    PrintWriter out;

    int getAns(int num, int radix) {
        int i = 0;
        int a[] = new int[1000];
        while (true) {
            a[i] = num % radix;
            num /= radix;
            if (num == 0) {
                break;
            }
            i++;
        }
        return a[i] + a[0];
    }

    void solve() {
        int a = in.nextInt();
        int sum = 0;
        int counter = 0;
        for (int i = 2; i <= a - 1; i++) {
            sum += getAns(a, i);
            counter++;
        }
        BigInteger s = new BigInteger(""+sum);
        BigInteger b = new BigInteger(""+counter);
        BigInteger gcd = s.gcd(b);
        out.print(s.divide(gcd)+"/"+b.divide(gcd));
    }

    void run() {

        in = new Scanner(System.in);
        out = new PrintWriter(System.out);

        try {
            solve();
        } finally {
            out.close();
        }
    }

    public static void main(String[] args) {
        Runtime r = Runtime.getRuntime();
        new Main().run();

    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int val = Integer.parseInt(in.readLine());
        int sum = 0;
        for (int i = 2; i < val; i++) {
            String code = Integer.toString(val, i);
            for (int j = 0; j < code.length(); j++) {
                if (code.charAt(j) <= 'z' && code.charAt(j) >= 'a') {
                    sum += code.charAt(j) - 87;
                } else {
                    sum += code.charAt(j) - 48;
                }
            }
        }
        int mcd = mcd(sum, val - 2);
        System.out.println(sum);
        System.out.println(val - 2);
        System.out.println(mcd);
        System.out.println(sum / mcd + "/" + (val - 2) / mcd);
    }

    private static int mcd(int a, int b) {
        return b == 0 ? a : mcd(b, a % b);
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Set;
import java.util.StringTokenizer;

public class CodeForce {

    public void solve() throws IOException {
        int n = nextInt();
        int ret = 0;
        for(int i = 2; i < n; i++) {
            int u = 0;
            int b = n;
            while(b > 0) {
                if(b % i != 0) u += (b % i);
                b /= i;
            }
            ret += u;
        }
        System.out.println(ret + "/" + (n - 2));
    }

    public static void main(String[] args) throws IOException {
        new CodeForce().run();
    }

    private BufferedReader reader;
    private StringTokenizer tokenizer;
    private PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        p1();
    }

    private static void p1(){
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int Asum=0;
        for (int i=2;i<A;i++){
            int tempA=A;
            int maxLength=(int)Math.ceil(Math.log(A)/Math.log(i));
            //int[] array=new int[maxLength];
            int sum=0;
            for (int j=0;j<maxLength;j++){
                //array[j]=tempA%i;
                sum+=tempA%i;
                tempA/=i;
            }
            Asum+=sum;
        }
        System.out.println(Asum+"/"+(A-2));
    }
}

/* round#13 */
import java.util.*;

public class A implements Runnable {
    public static void main(String[] args) {
        new A().run();
    }

    private void solve(String a) {
        int n = Integer.valueOf(a);
        int sum = 0;
        for (int i=2; i<n; ++i) {
            int w = n;
            while (w >= i) {
                sum += (w % i);
                w = w / i;
            }
            sum += w;
        }

        int d = n - 2;
        for (int i=2; i<n; ++i)
            if (((sum % i) == 0) && ((d % i) == 0)) {
                sum /= i;
                d /= i;
            }
        System.out.println(sum + "/" + d);
    }

    public void run() {
        try {
            Scanner s = new Scanner(System.in);
            String a = s.next();
            solve(a);
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

import java.io.PrintWriter;
import java.util.Scanner;
import java.util.Vector;

public class Solution {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();

        int all_sum = 0;

        for (int i = 2; i < n; i++) {
            Vector<Integer> v = get(n, i);

            int sum = 0;

            for (Integer j : v) {
                sum += j;
            }
            all_sum += sum;
        }

        int div = n - 2;

        for (int i = 2; i < 100000; i++) {
            while (all_sum % i == 0 && div % i == 0) {
                all_sum /= i;
                div /= i;
            }
        }

        out.print(all_sum + " " + div);

        out.close();
    }

    private static Vector<Integer> get(int n, int i) {
        Vector<Integer> ans = new Vector<Integer>();
        while (true) {
            ans.add(n % i);
            n /= i;
            if (n == 0)
                break;
        }
        return ans;
    }
}

import java.util.*;
import java.math.*;
import java.io.*;
public class Main {
    public static StringTokenizer st;
    public static BufferedReader scan;
    public static PrintWriter out;
    public static int f(int x, int base){
        int s = 0;
        while(x > 0){
            s += x % base;
            x /= base;
        }
        return s;
    }
    public static void main(String[] args) throws  IOException{
        scan = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int a = nextInt(), s = 0;
        for(int i = 2; i < a; i++){
            s += f(a, i);
        }
        out.println(s + "/" + (a - 2));
        scan.close();
        out.close();
    }
    public static BigInteger nextBigInteger() throws  IOException {
        return new BigInteger(next());
    }
    public static long nextLong() throws  IOException {
        return Long.parseLong(next());
    }
    public static double nextDouble() throws  IOException {
        return Double.parseDouble(next());
    }
    public static int nextInt() throws  IOException {
        return Integer.parseInt(next());
    }
    public static String next() throws IOException {
        while(st == null || !st.hasMoreTokens()){
            st = new StringTokenizer(scan.readLine());
        }
        return st.nextToken();
    }
}

import java.util.Scanner;

/*
 * 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.
 */

/**
 * @author Arief Rahman
 */
public class Numbers {
	/*
	 * @param x the number to transform
	 * @param y the base
	 * @return x in base y
	 */
	private static int base(int x, int y) {
		int temp;
		int sum = 0;
		while(x != 0) {
			temp = x % y;
			x = x / y;
			sum += temp;
		}
		return sum;
	}

	public static void main(String[] args) {
		// Ask for input (1 number)
		Scanner in = new Scanner(System.in);
		int input = in.nextInt();

		// Sum of the numbers
		int sum = 0;

		// Start finding the sum of all bases
		for(int i = 2; i < input; i++) {
			int numBase = base(input, i);
			sum += numBase;
		}

		System.out.println(sum + "/" + (input - 2));
	}
}

import java.io.IOException;
import java.util.Scanner;

public class thirteenA {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), s = 0, k = 0;
		for (int i = 2; i < a; i ++) {
			k = a;
			while (k > 0) {
				s = s + k % i;
				k = k / i;
			}
		}
		int r = a - 2;
		while (s % 2 == 0 && r % 2 == 0) {
			s = s / 2;
			r = r / 2;
		}
		System.out.println(s + "/" + r);
	}
}

import java.util.Scanner;

public class number {

	public static int sumConfirm(int n , int base){

		int sum = 0;
		while(n != 0 ){
			sum += n % base;
			n /= base;
		}
		return sum;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);

		int n = input.nextInt();
		int denominator = (n-2);
		int numerator = 0;
		for(int i=2 ; i<n ; i++){
			numerator += sumConfirm(n,i);
		}

		System.out.print(numerator + "/" + denominator);

		input.close();
	}

}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		int n = new Scanner(System.in).nextInt();
		int sum = 0;
		for (int i = 2; i < n; ++i) {
			String str = Integer.toString(n, i);
			for(char c : str.toCharArray()){
				sum += c - 48;
			}
		}
		System.out.println(sum +"/"+(n-2));
	}
}

import java.io.*;
import java.util.*;

import static java.lang.Integer.*;
import static java.lang.Math.*;
public class Code13A {

    public static void main(String[] args)throws Exception  {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(in.readLine());
        long sum = 0;
        for(int i=2;i<N;++i){
            String val = Integer.toString(N, i);
            for(int j=0;j<val.length();++j)
                sum+=(val.charAt(j)-'0');
        }
        long s = gcd(sum,N-2);
        if(sum%s == 0 && (N-2)%s==0)
            System.out.println((sum/s)+"/"+((N-2)/s));
        else
            System.out.println((sum)+"/"+((N-2)));
    }

    static long gcd(long a, long b ){
        long t;
        while(b!=0){
            t=b;
            b=a%b;
            a=t;
        }
        return a;
    }

}

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// System.out.println(BigInteger.valueOf(1000).toString(36));
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(getAns(n));
		// for (int i = 3; i <= 1000; i++)
		// System.out.println(getAns(i));

	}

	public static String getAns(int n) {
		int res = 0;
		for (int i = 2; i < n; i++) {
			String s = BigInteger.valueOf(n).toString(i);
//			System.out.println(n + " " + s);
			for (int j = 0; j < s.length(); j++) {
				res += Integer.parseInt(s.charAt(j) + "", 36);
			}
		}
		String ret = (res / gcd(res, n - 2)) + "/"
				+ ((n - 2) / gcd(res, n - 2));
		// System.out.println(ret);
		return ret;
	}

	public static int gcd(int a, int b) {
		return a == 0 ? b : gcd(b % a, a);
	}
}

import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.Scanner;

/**
 * http://codeforces.com/problemset/problem/13/A
 *
 * Numbers
 *
 */
public class A13 {
	public static void main(String[] args) throws IOException {
		solveNumbers();
	}

	public static void solveNumbers()throws IOException{
		Scanner scan = new Scanner(new BufferedInputStream(System.in));
		int n = scan.nextInt();
		int numerator  = 0;
		for (int i = 2; i < n; i++) {
			int t = n;
			while(t > 0){
				numerator  += t%i;
				t = t / i;
			}
		}

		int denominator = n - 2;
		while(numerator % denominator == 0 && denominator!= 1){
			numerator /= denominator;
		}
		System.out.println(numerator + "/" + denominator);
	}
}

import java.util.*;
import java.io.*;
public class Problem {
	static ArrayList<Character> alreadySeen = new ArrayList<Character>();
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		int input = Integer.parseInt(br.readLine());
		int totalSum = findSum(input);
		int numbers = input - 2;
		int gcd = gcf(totalSum, numbers);
		totalSum /= gcd;
		numbers /= gcd;
		out.println(totalSum + "/" + numbers);
		out.close();
	}
	public static int convertBase(int a, int b){
		String total = "";
		int q = a / b;
		int r = a % b;
		while(q != 0){
			total = r + total;
			a /= b;
			q = a / b;
			r = a % b;
		}
		total = a + total;
		return Integer.parseInt(total);
	}
	public static int sumDigits(int a){
		int total = 0;
		while(a != 0){
			total += a % 10;
			a /= 10;
		}
		return total;
	}
	public static int findSum(int a){
		int total = 0;
		for(int i = 2; i < a; i++){
			total += sumDigits(convertBase(a, i));
		}
		return total;
	}
	public static int gcf(int a, int b){
		for(int i = Math.min(a,  b); i >= 1; i--){
			if(a % i == 0 && b % i == 0){
				return i;
			}
		}
		return -1;
	}
}

import java.util.*;

public class Tester2
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int sum = 0;

		for (int i = 2; i < num; i++)
		{
			sum += summed(num, i);
		}

		int den = num - 2;
		System.out.println(sum + "/" + den);

	}

	public static int summed(int num, int base)
	{
		int total = 0;
		while (num > 0)
		{
			total += num % base;
			num /= base;
		}
		return total;
	}
}

import java.util.Scanner;
public class Numbers {
	public Numbers (){
		Scanner stream = new Scanner (System.in);
		int n = stream.nextInt() ;
		Sum (n);
	}
	public void Sum (int n ){
		int sum = 0 ;
		for (int i =2 ; i < n ; i++){
			sum += gcd(n,i) + n%i ;
		}
		System.out.println(sum + "/"+ (n-2));
	}

	public int gcd (int n , int m){
		if (m == 0){
			return n ;
		}else {
			return gcd (m , n%m) ;
		}
	}
	public static void main (String [] args ){
		new Numbers() ;
	}
}

import java.util.Scanner;

public class ProblemA {

    void run(){
           Scanner sc = new Scanner(System.in);
           int a=sc.nextInt();
           int res=binary(a);
           int count=1;
           for (int i=3;i<a;i++){
               count++;
               res+=other(a,i);
           }
           System.out.println(res+"/"+count);
           sc.close();
    }

    public int binary(int v){
        int res=0;
        while (v>0){
            if (v%2!=0)
                res++;
            v=v/2;
        }
        return res;
    }

    public int other(int v,int d){
        int res=0;
        while (v>d){
            if (v/d>d){
                v=(v/d-d)*d+(v%d);
                res++;
            }else{
                v=v/d+(v%d);
                res+=v;
            }
        }
        return res;
    }

    public static void main(String[] args) {
        new  ProblemA().run();
    }

}

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    public static int count(String x) {
        int ans = 0;
        char[] array = x.toCharArray();
        for (int i = 0; i < array.length; i++) {
            ans += (int) array[i] - 48;
        }
        return ans;
    }

    public static String fraction(int a, int b) {
        int aux = b;
        for (int i = 2; i <= aux; i++) {
            if(a%i==0 && b%i==0){
                a/=i;
                b/=i;
            }
        }
        return String.valueOf(a)+"/"+String.valueOf(b);
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        do {
            int n = scan.nextInt(), ans = 0;
            BigInteger b = new BigInteger("0");
            for (int i = 2; i < n; i++) {
                b = new BigInteger(String.valueOf(n), 10);
                ans += count(b.toString(i));
            }
            System.out.println(fraction(ans, n - 2));
            /*if (ans % (n - 2) == 0) {
                System.out.println(ans / (n - 2) + "/" + "1");
            } else {
                System.out.println(ans + "/" + (n - 2));
            }*/
        } while (scan.hasNext());
    }
}

import java.util.*;
public class A13{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt(), num, sum = 0;
        for(int i = 2; i < a; i++){
            num = a;
            while(num > 0){
                num /= i;
                sum++;
            }
        }
        System.out.println(sum + "/" + (a-2));
    }
}

import java.io.*;
import java.util.*;
public class A13
{
public static void main(String args[])
{
Scanner I=new Scanner(System.in);
int a,t=0;
a=I.nextInt();
int i,n;
for(i=2;i<a;i++)
{
n=a;
while(n>0)
{
t=t+n%i;
n=n/i;
}
}
System.out.println(t+"/"+(a-2));
}
}

import java.util.Scanner;

public class Number {
public static void main(String[] args){
    Scanner reader=new Scanner(System.in);
    int n=reader.nextInt();
    int ans=0;
    int m=n-2;
    for(int i=2;i<n;i++){
    ans+=getnum(n,i);

    }
    System.out.println(ans+"/"+m);

}
static int getnum(int a,int b){
    int ans=0;
while(a>0){
    ans+=a%b;
    a/=b;
}
return ans;
}
}

import java.util.Scanner;

public class CF013A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        long sum = 0;
        for(int i = 2;i<n;i++){
            String str = Integer.toString(Integer.parseInt("" + n , 10), i);
            int sumOfDigits = sum(str);
            sum += sumOfDigits;
        }
        System.out.println(sum + "/" + "" + (n-2));
    }

    private static int sum(String str) {
        int sum = 0;
        for (int i = 0; i < str.length(); i++) {
            sum += str.charAt(i) - 48;
        }
        return sum;
    }
}

/**
 * @(#)codeforce13a.java
 *
 *
 * @author
 * @version 1.00 2015/8/18
 */

import java.util.*;
public class codeforce13a {

    public static void main(String[]args)
    {
    	Scanner s=new Scanner(System.in);
    	int A=s.nextInt();
    	int c=0,d=0,a=0;
    	if(A>=3&&A<=1000)
        {
         for(int i=2;i<=A-1;i++)
         {
         	int b=A;
         	while(b!=0)
         	{
         	  a=b%i;
         	  b=b/i;
         	  c=a+c;
         	}
         	d=d+c;
         	c=0;
         }
         System.out.println(d+"/"+(A-2));
        }}}

import java.util.*;

public class Numbers {

    static int sum(int num,int base){
        int s = 0;

        while(num!=0){
            int x = num/base;

            s += (num%base);

            num = x;
        }

        return s;
    }
  public static  void main(String args[]){

      Scanner s = new Scanner(System.in);
      int n = s.nextInt();
       int sum = 0;
      for(int i=2;i<n;i++){
          sum += sum(n,i);
      }

      System.out.println(sum+"/"+(n-2));

  }

}

import java.util.Scanner;

public class A13 {

    public static void main(String[] args) {
        try (Scanner scanner = new Scanner(System.in)) {
            int a = scanner.nextInt();

            int sum = 0;

            for (int radix = 2; radix < a; radix++) {
                int n = a;
                while (n / radix != 0) {
                    sum += (n % radix);
                    n /= radix;
                }
                sum += (n % radix);
            }

            int numerator = sum;
            int denominator = a - 2;

            for (int i = 2; i <= Math.sqrt(Math.min(sum, a - 2)); i++) {
                while ((numerator >= i && numerator % i == 0) && (numerator >= i && denominator % i == 0)) {
                    numerator /= i;
                    denominator /= i;
                }
            }

            System.out.println(numerator + "/" + denominator);
        }
    }
}

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner ss=new Scanner(System.in);
        //int t=ss.nextInt();
        //while(t-->0){
            int num=ss.nextInt();
            int sum=0;
            for(int i=2;i<num;i++){
                sum+=sumn(jinzhi(i,num));
            }
            System.out.println(sum+"/"+(num-2));
        }
    //}
    public static int pow(int num,int m){
        int sum=1;
        for(int i=0;i<m;i++){
            sum*=num;
        }
        return sum;
    }
    public static int jinzhi(int base,int num){
        int sum=0,n=0;
        do{
            sum+=(num%base)*pow(10,n);
            num/=base;
            n++;
        }while((num/base)!=0);
        sum+=(num%base)*pow(10,n);
        return sum;
    }
    public static int sumn(int num){
        int sum=0;
        while(num!=0){
            sum+=num%10;
            num/=10;
        }
        return sum;
    }
}

import java.io.IOException;
import java.util.Scanner;

public class thirteenA {
	public static void main(String args[]) throws IOException {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), s = 0, k = 0;
		for (int i = 2; i < a; i ++) {
			k = a;
			while (k > 0) {
				s = s + k % i;
				k = k / i;
			}
		}
		int r = a - 2;
		while (s % 2 == 0 && r % 2 == 0) {
			s = s / 2;
			r = r / 2;
		}
		System.out.println(s + "/" + r);
	}
}

//package code;
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
import java.text.*;
import java.math.*;
import java.util.regex.*;
import java.awt.Point;
/**
 *
 * @author prabhat // use stringbuilder,TreeSet, priorityQueue, x+y=(x&y + x|y);
 */                                                           //X+y=2*(x&y)+ x^y;
  public class  a
   {
   public static int n,max1=2000005,k,m,q,a[],a1[],mat[][],id,depth[],parent[][],len=22,tin[],tout[],count=0,size[],sum,cnt;
   public static Point[] p1,p2,p;
   public static long mod=(long)1e9+7,nCr[][],suf[][],ans=0,max=Long.MIN_VALUE,dp[],l,r;
   public static boolean isPrime[],visit[][],valid[][];
   public static HashSet<Integer> hash;
   public static PriorityQueue<Integer> pq[];
   public static  ArrayList<Integer> divisor[],prime,adj[],lpf,list[],pri;
   //public static ArrayList<Character> list[];
   public static  TreeMap<Integer,Integer> tmap[];
   public static String s;
   //public static pair[] pa;
   public  static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
   static PrintWriter pw;
   static int[] x={-1,0,1},y={1,0,-1};

   public static void main(String[] args) throws IOException
   {
	InputReader in = new InputReader(System.in);
	pw=new PrintWriter(System.out);
    n=in.ii();
    int cnt=0;
    int sum=0;
    for(int i=2;i<=n-1;i++)
    {
      cnt++;
      sum+=get(n,i);
    }
    pw.println(sum+"/"+cnt);
	pw.close();
   }
 static int get(int n,int x)
 {
 	int sum=0;
 	while(n>0)
 	{
 		sum+=n%x;
 		n/=x;
 	}
 	return sum;
 }
 static class Edge{
	 String name;
	int  point,goal;
	Edge(String name,int x,int y)
	{
	   this.name=name;
	   point=x;
	   goal=y;
	}
 }
static int lowerBound(ArrayList<Integer> al,int tar)
{
	   int s=0;
	   int e=al.size()-1;
	   int ans=0;
	   while(s<=e)
	   {
		   int mid=(s+e)/2;
		   if(al.get(mid)<=tar){s=mid+1;ans=mid+1;}
		   else e=mid-1;
	   }
	   return ans;
}

static boolean isVowel(char c)
{
	return c=='a'||c=='e'||c=='i'||c=='o'||c=='u';
}

public  static class DSU
{
	int[] parent;
	int[] rank;

	int cnt;
	public DSU(int n){
		parent=new int[n];
		rank=new int[n];
		for(int i=0;i<n;i++){
			parent[i]=i;
			rank[i]=1;
		}
		cnt=n;
	}
	int find(int i){
		while(parent[i] !=i){
			parent[i]=parent[parent[i]];
			i=parent[i];
		}
		return i;
	}
	void Union(int x, int y){
		int xset = find(x);
		int yset = find(y);
		if(xset!=yset)
			cnt--;

		if(rank[xset]>rank[yset])
		{
			parent[yset] = xset;
		    rank[xset]+=rank[yset];
			rank[yset]=0;
			//return xset;
		}else{
			parent[xset]=yset;
			rank[yset]+=rank[xset];
			rank[xset]=0;
			//return yset;
		}

     return;
	}
}

 static int palin(String s)
 {
	String s1=new StringBuilder(s).reverse().toString();
	return s1.equals(s)==true?1:0;
 }
 /*static int dfs(int u, int p) {

	//discover[count1++]=arr[u];  //  it storing color or arr of vertex u
	//discover[count1++]=u;
	//tin[u] = count++;
   int d1=1000000;
   int d2=1000000;
   int cnt=0;
	//parent[u][0] = p==-1?0:p;
	//size[u]++;
	//for (int i = 1; i < len; i++)
	//	parent[u][i] = parent[parent[u][i-1]][i-1];
	for (int v :adj[u])
		if (v != p)
		{
			cnt++;
			depth[v] = depth[u] + 1;
			int y=dfs( v, u);
			if(y<d1)
			{
				d2=d1;
				d1=y;
			}
			else if(y<d2)
			{
				d2=y;
			}
	//		size[u] += size[v];
		}
	if(cnt==0)return 1;
	ans=Math.min(d1+d2,ans);
	return 1+Math.min(d1,d2);
//	if(adj[u].size()==1&&parent[u][0]!=0)last.add(u);
//	tout[u] = count-1;
}
*/

static boolean isParent(int parent, int child) {
	return tin[parent] <= tin[child] && tout[child] <= tout[parent];
}

static int lca(int a, int b) {
	if (isParent(a, b))
		return a;
	if (isParent(b, a))
		return b;
	for (int i = len - 1; i >= 0; i--)
		if (!isParent(parent[a][i], b))
			a = parent[a][i];
	return parent[a][0];
}
static boolean valid(int i,int j)
{
	return i>=0&&i<3&&j>=0&&j<3;
}

static int gcd(int a,int b)
{
	while(a!=0)
	{
		int temp=a;
		a=b%a;
		b=temp;
	}
	return b;
}
static void Seive()
{
	a1=new int[max1];
	isPrime=new boolean[max1];
	Arrays.fill(isPrime,true);
	prime=new ArrayList<>();
	divisor=new ArrayList[max1];
	for(int i=1;i<max1;i++)divisor[i]=new ArrayList<Integer>();
    isPrime[0]=isPrime[1]=false;
	for(int i=2;i<(max1);i++)
	{
         if(isPrime[i]){
			 divisor[i].add(i);
			 prime.add(i);
			 a1[i]=1;
			for(int j=2*i;j<max1;j+=i)
			{
				a1[j]++;
				isPrime[j]=false;
				divisor[j].add(i);
			}
		}
	}
}
public static long pow(long n,long p)
{
	 long  result = 1;
	  if(p==0)
	    return 1;

	while(p!=0)
	{
	    if(p%2==1)
	        result *= n;

	    p >>=1;
	    n*=n;
	}
	return result;
}

static  class InputReader
{
   private InputStream stream;
   private byte[] buf = new byte[1024];

   private SpaceCharFilter filter;
    byte inbuffer[] = new byte[1024];
   int lenbuffer = 0, ptrbuffer = 0;
    final int M = (int) 1e9 + 7;
   int md=(int)(1e7+1);
    int[] SMP=new int[md];
   final double eps = 1e-6;
   final double pi = Math.PI;

	PrintWriter out;
   String check = "";
 InputStream   obj = check.isEmpty() ? System.in : new ByteArrayInputStream(check.getBytes());
   public InputReader(InputStream stream)
   {
       this.stream = stream;
   }

    int readByte() {
	        if (lenbuffer == -1) throw new InputMismatchException();
	        if (ptrbuffer >= lenbuffer) {
	            ptrbuffer = 0;
	            try {
	                lenbuffer = obj.read(inbuffer);
	            } catch (IOException e) {
	                throw new InputMismatchException();
	            }
	        }
	        if (lenbuffer <= 0) return -1;
	        return inbuffer[ptrbuffer++];
   }

   public  int read()
   {
       int c = read();
       while (isSpaceChar(c))
           c = read();
       int sgn = 1;
       if (c == '-')
       {
           sgn = -1;
           c = read();
       }
       int res = 0;
       do
       {
           if (c < '0' || c > '9')
               throw new InputMismatchException();
           res *= 10;
           res += c - '0';
           c = read();
       } while (!isSpaceChar(c));
       return res * sgn;
   }

   String is() {
	        int b = skip();
	        StringBuilder sb = new StringBuilder();
	        while (!(isSpaceChar(b))) // when nextLine, (isSpaceChar(b) && b!=' ')
	        {
	            sb.appendCodePoint(b);
	            b = readByte();
	        }
	        return sb.toString();
   }
   public   int ii() {
	        int num = 0, b;
	        boolean minus = false;
	        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
	        if (b == '-') {
	            minus = true;
	            b = readByte();
	        }
	        while (true) {
	            if (b >= '0' && b <= '9') {
	                num = num * 10 + (b - '0');
	            } else {
	                return minus ? -num : num;
	            }
	            b = readByte();
	        }
   }
 public   long il() {
	        long num = 0;
	        int b;
	        boolean minus = false;
	        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
	        if (b == '-') {
	            minus = true;
	            b = readByte();
	        }
	        while (true) {
	            if (b >= '0' && b <= '9') {
	                num = num * 10 + (b - '0');
	            } else {
	                return minus ? -num : num;
	            }
	            b = readByte();
	        }
   }

	    boolean isSpaceChar(int c) {
	        return (!(c >= 33 && c <= 126));
	       }

	      int skip()
	        {
	        int b;
	        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
	        return b;
	        }

	    float nf() {
	        return Float.parseFloat(is());
	    }

	    double id() {
	        return Double.parseDouble(is());
	    }

	    char ic() {
	        return (char) skip();
	    }

	    int[] iia(int n) {
	        int a[] = new int[n];
	        for (int i = 0; i<n; i++) a[i] = ii();
	        return a;
	    }

	    long[] ila(int n) {
	        long a[] = new long[n];
	        for (int i = 0; i <n; i++) a[i] = il();
	        return a;
	    }

	    String[] isa(int n) {
	        String a[] = new String[n];
	        for (int i = 0; i < n; i++) a[i] = is();
	        return a;
	    }

		 long mul(long a, long b) { return a * b % M; }

		/*	long div(long a, long b)
				 {
					return mul(a, pow(b, M - 2,M));

		           }
*/

	    double[][] idm(int n, int m) {
	        double a[][] = new double[n][m];
	        for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) a[i][j] = id();
	        return a;
	        }

	    int[][] iim(int n, int m) {
	        int a[][] = new int[n][m];
	        for (int i = 0; i < n; i++) for (int j = 0; j <m; j++) a[i][j] = ii();
	        return a;
          }

   public String readLine() {
       int c = read();
       while (isSpaceChar(c))
           c = read();
       StringBuilder res = new StringBuilder();
       do {
           res.appendCodePoint(c);
           c = read();
       } while (!isEndOfLine(c));
       return res.toString();
   }

   public interface SpaceCharFilter
   {
       public boolean isSpaceChar(int ch);
   }
   public boolean isEndOfLine(int c) {
       return c == '\n' || c == '\r' || c == -1;
   }
}

}

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = n;
        int x = 0;
        int y = n - 2;
        for(int i=2; i<n; i++) {
            while(k >= i) {
                x += k % i;
                k /= i;
            }
            x += k;
            k = n;
        }
        System.out.println(x + "/" + y);
    }
}

import java.util.Scanner;

public class PrA {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int sum = 0;
        for(int i = 2; i < a; i++) {
            int k = getSum(a, i);
            sum += k;
        }
        System.out.println(sum + "/" + (a - 2));

    }

    private static int getSum(int a, int b) {
        int sum = 0;
        while(a > 0) {
            sum += a%b;
            a = a/b;
        }
        return sum;
    }

}

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = n;
        int x = 0;
        int y = n / 2;
        for(int i=2; i<n; i++) {
            while(k >= i) {
                x += k % i;
                k /= i;
            }
            x += k;
            k = n;
        }
        x = (n % 2) == 0 ? x / 2 : x;
        System.out.println(x + "/" + y);
    }
}

/* round#13 */
import java.util.*;

public class A implements Runnable {
    public static void main(String[] args) {
        new A().run();
    }

    private void solve(String a) {
        int n = Integer.valueOf(a);
        int sum = 0;
        for (int i=2; i<n; ++i) {
            int w = n;
            while (w >= i) {
                sum += (w % i);
                w = w / i;
            }
            sum += w;
        }

        int d = n - 2;
        for (int i=2; i<n; ++i)
            if (((sum % i) == 0) && ((d % i) == 0)) {
                sum /= i;
                d /= i;
            }
        System.out.println(sum + "/" + d);
    }

    public void run() {
        try {
            Scanner s = new Scanner(System.in);
            String a = s.next();
            solve(a);
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

import java.util.Scanner;

public class ACodeForces {
    static int sum1 = 0;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int sum2 = 0;

        for(int i = 2; i <= a-1; i++){
            convertToBaseNAndGetSumOfDigits(a, i);
            sum2+=sum1;
            sum1 = 0;
        }

        System.out.println(sum2+"/"+(a-2));
    }

    public static String convertToBaseNAndGetSumOfDigits(int num, int baseN){
        int remainder = num % baseN;
        int quotient = num / baseN;
        if(quotient == 0){
            sum1 += remainder;
            return Integer.toString(remainder);
        }
        else{
            String s = convertToBaseNAndGetSumOfDigits(quotient, baseN);
            sum1 += remainder;
            return s + Integer.toString(remainder);
        }
    }
}

import java.io.InputStreamReader;
import java.util.Scanner;

public class Main20 {

    public static int gcd(int a,int b){
        if (b == 0)return a;
        return gcd(b , a %b);
    }
    public static void main(String[] args) {
        int n = 0;
        Scanner s = new Scanner(new InputStreamReader(System.in));
        n = s.nextInt();
        String res = "";
        int sum = 0;
        for (int i = 2; i < n; i++) {
            res = Integer.toString(n,i);
//          System.out.println(res);
            for (Character c : res.toCharArray()){
                if (c >= '0' && c <= '9') sum += c-'0';
                else if (c >= 'a') sum += c -'a' + 10;
            }
        }
        int x=  gcd (sum,n-2);
        System.out.println((sum/x)+ "/" + (n-2)/x);
    }

}

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();
        int sum=0;
        for(int i=2;i<n;i++){
            String x= Integer.toString(n, i);
            sum= sum+ sumDigits(x);
        }
        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.
    }
}

import java.util.*;
public class CF13A {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int numerator = 0; int denominator = 0;
		for (int i = 2; i < n; i++)
		{
			denominator++;
			for(int temp:ConvertNumber(n,i))
			{
				numerator+=temp;
			}
		}

		int counter = 1;
		while(true)
		{
			if (numerator % counter == 0 && denominator % counter == 0)
			{
				numerator = numerator / counter;
				denominator = denominator / counter;
				counter++;
			}
			else
				break;
		}

		System.out.print(numerator + "/" + denominator);
	}

	static ArrayList<Integer> ConvertNumber(int number, int base)
	{
		int power = 0;
		ArrayList<Integer> list = new ArrayList<Integer>();
		while (Math.pow(base, power) <= number)
			power++;

		power--;

		while (power >=0)
		{
			int multiple = number / (int)Math.pow(base, power);
			list.add(multiple);
			number = number - multiple*(int)Math.pow(base, power);
			power--;
		}

		if (list.size() == 0)
				list.add(number);

		return list;
	}

}

/* round#13 */
import java.util.*;

public class A implements Runnable {
    public static void main(String[] args) {
        new A().run();
    }

    private void solve(String a) {
        int n = Integer.valueOf(a);
        int sum = 0;
        for (int i=2; i<n; ++i) {
            int w = n;
            while (w >= i) {
                sum += (w % i);
                w = w / i;
            }
            sum += w;
        }

        System.out.println(sum + "/" + (n-2));
    }

    public void run() {
        try {
            Scanner s = new Scanner(System.in);
            String a = s.next();
            solve(a);
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

import static com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.Int;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
import java.util.stream.IntStream;
import static jdk.nashorn.internal.objects.Global.Infinity;
import static jdk.nashorn.internal.objects.Global.NaN;

/**
 *
 * @author george
 */
public class main {
 static boolean  isPrime(int n) {
    for(int i=2;i<n;i++) {
        if(n%i==0)
            return false;
    }
    return true;
}
static public class Princess{
 public int rate;public int beauty;public int intellect;public int richness;
 public Princess(int sum,int a,int b,int c){
  this.rate=sum;
  this.beauty=a;
  this.intellect=b;
  this.richness=c;
  }
 }

   public static void main (String []  args)
    {
 Scanner s=new Scanner(System.in);
       int n=s.nextInt();
        int sum=0;int temp=n;
        for (int i = 2; i < n; i++) {
            while(n!=0){
            sum+=n%i;
            n=n/i;
            }
            n=temp;
        }
        n=n-2;
       while((sum%2==0&&n%2==0)||(sum%3==0&&n%3==0)||(sum%5==0&&n%5==0)||(sum%7==0&&n%7==0)||(sum%11==0&&n%11==0)){
       if((sum%2==0&&n%2==0)){sum=sum/2;n=n/2;}
       else if((sum%3==0&&n%3==0)){sum=sum/3;n=n/3;}
       else if((sum%5==0&&n%5==0)){sum=sum/5;n=n/5;}
       else if((sum%7==0&&n%7==0)){sum=sum/7;n=n/7;}
       else if((sum%11==0&&n%11==0)){sum=sum/11;n=n/11;}
       }
       System.out.print(sum);  System.out.print('/');  System.out.print(n);

    }

}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A62 {

	static InputStreamReader inp = new InputStreamReader(System.in);
	static BufferedReader in = new BufferedReader(inp);
	static boolean test = false;

	public String str() throws IOException {
		return in.readLine();
	}

	public static void main(String[] args) throws Throwable {
		if (test) {
			in = new BufferedReader(new FileReader(new File("testdata.txt")));
		}

		new A62().solve();
	}

	private int[] ints() throws Throwable {
		StringTokenizer st = new StringTokenizer(str());

		int[] res = new int[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = Integer.parseInt(st.nextToken());
		}
		return res;
	}

	private long[] longs() throws Throwable {
		StringTokenizer st = new StringTokenizer(str());

		long[] res = new long[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = Long.parseLong(st.nextToken());
		}
		return res;
	}

	private BigInteger[] bigs() throws Throwable {
		StringTokenizer st = new StringTokenizer(str());

		BigInteger[] res = new BigInteger[st.countTokens()];
		for (int i = 0; i < res.length; i++) {
			res[i] = new BigInteger(st.nextToken());
		}
		return res;
	}

	private int in() throws NumberFormatException, IOException {
		return Integer.parseInt(str());
	}

	private void solve() throws Throwable {
		int n = in();
		int cnt = 0;
		for (int i = 2; i < n; i++) {
			int tmp = n;

			while (tmp > 0) {
				tmp /= i;
				cnt++;
			}
		}
		int gcd = GCD(cnt, n - 2);
		System.out.println(cnt / gcd + "/" + (n - 2)/gcd);
	}

	public int GCD(int a, int b) {
		if (b == 0)
			return a;
		return GCD(b, a % b);
	}
}

import java.util.*;

public class Numbers
{
	public static int[] getInBase(int n, int b)
	{
		int[] ar = new int[1001];
		int i = 0;
		Arrays.fill(ar, 0);

		while(n > 0)
		{
			ar[i++] = n % b;
			n /= b;
		}

		return ar;
	}

	public static int gcd(int a, int b)
	{
		return b == 0 ? a : gcd(b, a % b);
	}

	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int sum = 0;

		for(int i = 2; i < n; ++i)
		{
			int[] ar = getInBase(n, i);

			for(int x : ar)
				sum += x;
		}

		int g = gcd(sum, n);
		System.out.printf("%d/%d\n", sum, n - 2);
	}
}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		int n = new Scanner(System.in).nextInt();
		int sum = 0;
		for (int i = 2; i < n; ++i) {
			String str = Integer.toString(n, i);
			for(char c : str.toCharArray()){
				sum += c - (c<96 ? 48 : 87);
			}
		}
		System.out.println(sum +"/"+(n-2));
	}
}

import java.util.Scanner;

public class MainS {

	public static void main(String[] args) {

		Scanner scanMe=new Scanner(System.in);
		int Bases=scanMe.nextInt();
		String currentNumber=null;
		int sum=0;
		int iterator =0;
		int cur=0;
		int rem=0;
		int quotient=0;
		for(int o = 2;o<Bases;o++){
			cur=Bases;
			String crStr = String.valueOf(cur);
			//437
			for(int l = 0 ; l<crStr.length();l++){
			quotient = Bases / o;
			rem = Bases % o;}
		}
		for (int i=2;i<Bases;i++){
		 iterator++;
		 currentNumber = Integer.toString(Bases,i);

		 for(int k = currentNumber.length()-1,b=0;b<currentNumber.length()&k>=0;k--,b++){
			 int num=0;
			 num =(int) (Character.getNumericValue(currentNumber.charAt(b)));
			 sum+=num;
		 }
		}

		System.out.printf("%d/%d",sum,iterator);
		scanMe.close();
	}
}

import java.util.Scanner;

/**
 * @author artyom
 */
public class Numbers {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), sum = 0;
		for (int i = 2; i < a; i++) {
			int x = a;
			while (x >= i) {
				sum += x % i;
				x /= i;
			}
			sum += x;
		}
		System.out.println(sum + "/" + (a - 2));
	}
}

import java.util.*;
/**
 * Created by Zafar Mahmudov on 03.08.2014.
 */
public class A13 {
    /*static int a;
    static int b;
    public static void swap(int x, int y)
    {
        int c;
        c = x;
        a = y;
        b = c;
    }*/

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int sum = 0, ss = A - 1, num;
        while(ss > 1) {
            num = A;
            while(num > 0) {
                sum += (num % ss);
                num /= ss;
            }
            ss--;
        }
        //System.out.println("YES");
        int a = sum, b = A - 1, t;
        ss = A - 2;
        while(b > 0) {
            a %= b;
            a = a + b;
            b = a - b;
            a = a - b;
        }
        if(a <= sum && a <= ss) {
            sum /= a;
            ss /= a;
        }
        System.out.println(sum + "/" + ss);
    scan.close();
    }
}

import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int x = scan.nextInt(), r, sol = 0, aux, i;
        for (i = 2; i <= x-1; i++){
            aux = x;
            while(x != 0){
                sol += x % i;
                x /= i;
            }
            x = aux;
        }
        System.out.println(sol+"/"+(x-2));
    }
}

import java.util.*;
public class number
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        int A = in.nextInt();
        int result = 0;
        int C = A;
        String res= "";
        int i = 2;
        for (i = 2; i < C; i++)
        {
            A = C;
            while(A >= i)
            {
                result = result+A%i;
                A = A - A%i;
                A = A/i;
            }
            result+=A;
        }
        if(result%2 ==0&&i%2==0)
        {
            result = result/2;
            res = result+"/"+(C-2)/2;
        }
        else
        {
            res = result+"/"+(C-2);
        }
            System.out.println(res);

    }

}

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt(),quo,rem,sum,fsum=0;
        for(int i=2;i<n;i++){
            quo=n;
            rem=0;
            sum=0;
            while(quo!=0){
                sum=sum+(quo%i);
                quo=quo/i;
            }
            fsum=fsum+sum;
        }
        int num=n-2;
        for(int i=2;i<=num;i++){
            if(fsum%i==0&&(n-2)%i==0){
                fsum=fsum/i;
                num=num/i;
            }
        }
        System.out.println(fsum+"/"+num);
    }
}

import java.util.Scanner;

public class MAIN {

    public static void main(String args[]) {

        Scanner input = new Scanner(System.in);

        int x = input.nextInt();
        int counter = 0, sum = 0, value = 0;
        for (int i = 2; i < x; i++) {
            value = x;
            sum += value % i;
            while (value / i != 0) {
                value /= i;
                sum += value % i;
            }
            counter++;
        }

        System.out.println(sum + "/" + counter);
    }
}

import java.util.Scanner;

public class ProblemA {

    void run(){
           Scanner sc = new Scanner(System.in);
           int a=sc.nextInt();
           int res=binary(a);
           int count=1;
           for (int i=3;i<a;i++){
               count++;
               res+=other(a,i);
           }
           System.out.println(res+"/"+count);
           sc.close();
    }

    public int binary(int v){
        int res=0;
        while (v>0){
            if (v%2!=0)
                res++;
            v=v/2;
        }
        return res;
    }

    public int other(int v,int d){
        int res=0;
        while (v>d){
            if (v/d>d){
                v=(v/d-d)*d+(v%d);
                res++;
            }else{
                v=v/d+(v%d);
                res+=v;
            }
        }
        return res;
    }

    public static void main(String[] args) {
        new  ProblemA().run();
    }

}

import java.util.Scanner ;

public class SumOfbase {
    public static void main(String[] args) {
        Scanner  kb = new Scanner (System.in) ;
        int a = kb.nextInt() ;
        int sum = 0 ;
        for (int i = 2 ; i<= a-1 ; i++) {
            sum +=  SumofConvert (a, i) ;
       }
       System.out.println(sum+"/"+(a-2));

    } // main

    public static int SumofConvert (int XbaseValue , int fbase) {
        int sum = 0 ;
    while ( XbaseValue !=0 ) {
         sum += XbaseValue % fbase ;
         XbaseValue /= fbase ;

    } ;
        return sum ;

    } //
} // class

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = n;
        int x = 0;
        int y = n-2;
        for(int i=2; i<n; i++) {
            while(k >= i) {
                x += k % i;
                k /= i;
            }
            x += k;
            k = n;
        }
        x = (n % 2) == 0 ? (x / 2) : x;
        y = (n % 2) == 0 ? (y / 2) : y;
        System.out.println(x + "/" + y);
    }
}

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.InputMismatchException;

public class GetTheGift {
    private InputReader in;
    private PrintWriter out;

    private void solve() {
        int A = in.readInt();
        int sum = 0;
        int count = 0;
        for (int i = 2 ; i < A ; i++) {
            String a1 = Integer.toString(A , i);
            int b = 0;
            for (int j = 0; j < a1.length(); j++) {
                if (a1.charAt(j) == 'a') {
                    b += 10;
                }else if (a1.charAt(j) == 'b') {
                    b += 11;
                }else if (a1.charAt(j) == 'c'){
                    b += 12;
                }else if (a1.charAt(j) == 'd') {
                    b += 13;
                }else if (a1.charAt(j) == 'e') {
                    b += 14;
                }else if (a1.charAt(j) == 'f') {
                    b += 15;
                }else {
                    b += a1.charAt(j)-'0';
                }
            }
            sum += b;
            count++;
        }
        int gcd = BigInteger.valueOf(sum).gcd(BigInteger.valueOf(count)).intValue();
        sum /= gcd;
        count /= gcd;
        System.out.println(sum +"/"+count);
    }

    public static void main(String[] args) {
        new GetTheGift().run();
    }

    private GetTheGift() {

        in = new InputReader(System.in);
        out = new PrintWriter(System.out);
    }

    private void run() {

        solve();
        exit();
    }

    @SuppressWarnings({ "UnusedDeclaration" })
    private void exit() {
        out.close();
        System.exit(0);
    }

    @SuppressWarnings({ "UnusedDeclaration" })
    private static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar, numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuffer res = new StringBuffer();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private String readLine0() {
            StringBuffer buf = new StringBuffer();
            int c = read();
            while (c != '\n' && c != -1) {
                if (c != '\r')
                    buf.appendCodePoint(c);
                c = read();
            }
            return buf.toString();
        }

        public String readLine() {
            String s = readLine0();
            while (s.trim().length() == 0)
                s = readLine0();
            return s;
        }

        public String readLine(boolean ignoreEmptyLines) {
            if (ignoreEmptyLines)
                return readLine();
            else
                return readLine0();
        }

        public BigInteger readBigInteger() {
            try {
                return new BigInteger(readString());
            } catch (NumberFormatException e) {
                throw new InputMismatchException();
            }
        }

        public char readCharacter() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            return (char) c;
        }

        public double readDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, readInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = readInt();
            return array;
        }

        public long[] readLongArray(int size) {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
                array[i] = readLong();
            return array;
        }

        public double[] readDoubleArray(int size) {
            double[] array = new double[size];
            for (int i = 0; i < size; i++)
                array[i] = readDouble();
            return array;
        }

        public String[] readStringArray(int size) {
            String[] array = new String[size];
            for (int i = 0; i < size; i++)
                array[i] = readString();
            return array;
        }

        public char[][] readTable(int rowCount, int columnCount) {
            char[][] table = new char[rowCount][columnCount];
            for (int i = 0; i < rowCount; i++) {
                for (int j = 0; j < columnCount; j++)
                    table[i][j] = readCharacter();
            }
            return table;
        }

        public void readIntArrays(int[]... arrays) {
            for (int i = 0; i < arrays[0].length; i++) {
                for (int j = 0; j < arrays.length; j++)
                    arrays[j][i] = readInt();
            }
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Solution {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String A = in.readLine();
        Integer integerA = Integer.parseInt(A);
        Integer summary = 0;
        BigInteger bigA = new BigInteger(A);
        for (int i = 2; i < integerA; ++i) {
            String AInRadixI = bigA.toString(i);
            for (int j = 0; j < AInRadixI.length(); ++j) {
                summary += AInRadixI.charAt(j) - (int) ('0');
            }
        }
        Boolean[] primes = new Boolean[integerA];
        for (int i = 2; i < integerA; ++i) {
            primes[i] = true;
        }
        for (int i = 2; i < integerA; ++i) {
            if (primes[i]) {
                int a = 2 * i;
                while (a < integerA) {
                    primes[a] = false;
                    a += i;
                }
            }
        }

        int z = integerA - 2;
        for (int i = 2; i < integerA; ++i) {
            if (primes[i]) {
                while (summary % i == 0 && z % i == 0) {
                    summary = summary / i;
                    z = z / i;
                }
            }
        }
        System.out.println(summary + "/" + z);
    }

}

import java.util.Scanner;
public class Numbers {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt(),quo,rem,sum,fsum=0;
        for(int i=2;i<n;i++){
            quo=n;
            rem=0;
            sum=0;
            while(quo!=0){
                sum=sum+(quo%i);
                quo=quo/i;
            }
            fsum=fsum+sum;
        }
        System.out.println(fsum+"/"+(n-2));
    }
}

import java.util.*;
public class A13 {

	public static int val(int A,int x){
		int ans = 0;
		int temp = A;
		while(temp>0){
			ans++;
			temp=temp/x;
		}
		return ans;
	}

	public static int gcd(int a, int b){
		return a%b==0? b: gcd(b,a%b);
	}

	public static String reduce(int sum, int down){
		int k = gcd(sum,down);
		sum= sum/k;
		down = down/k;
		return (sum+"/"+down);

	}

	public static void main(String args[]){

		Scanner in = new Scanner(System.in);
		int A = in.nextInt();

		int sum=0;
		for(int x = 2;x<A;x++){
			sum=sum+val(A,x);
		}
		System.out.println(reduce(sum,A-2));

	}

}

import java.util.Scanner;

public class Numbers {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int numBases = n-2;
        long sum = 0;
        for(int i = 2; i < n; ++i) {
            int tmp = n;
            while (tmp > 0) {
                int digit = tmp % i;
                sum += digit;
                tmp /= i;
            }
        }
        System.out.println(sum+"/"+numBases);
    }
}

import java.util.Scanner;

public class RENAMETHISBITCH {

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {

			int n = sc.nextInt();
			int sum = 0;

			for (int i = 2; i < n; i++) {
				String s = Integer.toString(n, i);
				sum += digitSum(s);
			}
			System.out.println(sum + "/" + (n - 2));
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}

	private static int digitSum(String s) {

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += s.charAt(i) - '0';
		}
		return sum;
	}
}

import java.util.Scanner;
public class Problem3 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int temp=n-2;
		int sum=0;
		for(int i=2;i<n;i++) {

			sum+=n%i+1;
			System.out.println(sum);
		}
		System.out.println(sum +"/"+ temp );
	}
}

import java.util.Scanner;
public class Numbers {
	public Numbers (){
		Scanner stream = new Scanner (System.in);
		int n = stream.nextInt() ;
		Sum (n);
	}
	public void Sum (int n ){
		int sum = 0 ;
		for (int i =2 ; i < n ; i++){
			sum += gcd(n,i) + n%i ;
		}
		int g = gcd (sum, n-2);
		System.out.println(sum/g + "/"+ (n-2)/g);
	}
	public int gcd (int n , int m){
		if (m == 0){
			return n ;
		}else {
			return gcd (m,n%m) ;
		}
	}
	public static void main (String [] args ){
		new Numbers() ;
	}
}

import java.util.Scanner;
public class A13 {
	public static void main (String[]args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int counter = 0;
		for(int i = 2; i<A; i++) {
			int tmp = A;
			while(tmp != 0) {
				counter = counter + tmp%i;
				tmp = tmp/i;
			}
		}
		System.out.print(counter + "/" + (A-2));
	}
}

import java.util.Scanner;

public class Numbers {
    int x;
    public Numbers() {
        Scanner scanner = new Scanner(System.in);
        x = scanner.nextInt();
    }

    /**
     * 与えられた整数の各桁の数字の総和。
     */
    private int getDigitSum(String n) {
        int sum = 0;
        for(int i=0; i<n.length(); i++) {
            char c = n.charAt(i);
            if('0' <= c && c <= '9') {
                sum += (c - '0');
            } else {
                sum += (c - 'a') + 10;
            }
        }
        return sum;
    }

    private int gcd(int a, int b) {
        // gcd(12, 18) = 6
        return b == 0 ? a : gcd(b, a%b);
    }

    private void process() {
        int sum = 0;
        for(int i=2; i<x; i++) {
            String tmp = Integer.toString(x, i);
            sum += getDigitSum(tmp);
        }
        int gcd = gcd(sum, x-2);
        System.out.println((sum/gcd) + "/" + ((x-2)/gcd));
    }

    public static void main(String[] args) {
        new Numbers().process();
    }
}

import java.util.*;
import java.io.*;
public class Main {
    static BufferedReader reader
		= new BufferedReader(new InputStreamReader(System.in));
    static StringBuilder out = new StringBuilder();

    public static void main(String[] args){
			int A = nextInt();
			int sum=0;
			for(int i=2;i<A;i++){
					sum+=baseA(i,A);
			}

			System.out.println(sum+"/"+(A-2));

    }
	static int baseA(int a,int x){
			int sum=0;
			int count=0;
			while(true){
					if(x<Math.pow(a,count))
							break;
					else
							count++;
			}
			count--;
			for(int i=count;0<=i;i--){
					double tmp = Math.pow(a,i);
					if(x>=tmp){
							int count2=1;
							while(true){
									if(x<tmp*count2)
											break;
									else
											count2++;
							}
							count2--;
							x-=tmp*count2;
							sum+=count2;
					}
			}
			return sum;

	}

    // the followings are methods to take care of inputs.
    static int nextInt(){
        return Integer.parseInt(nextLine());
    }
    static long nextLong(){
        return Long.parseLong(nextLine());
    }
    static int[] nextIntArray(){
        String[] inp = nextLine().split("\\s+");
        int[] ary = new int[inp.length]; for (int i = 0; i < ary.length; i++){
            ary[i] = Integer.parseInt(inp[i]);
        }
        return ary;
    }
    static int[] nextIntArrayFrom1(){
        String[] inp = nextLine().split("\\s+");
        int[] ary = new int[inp.length + 1];
        for (int i = 0; i < inp.length; i++){
            ary[i+1] = Integer.parseInt(inp[i]);
        }
        return ary;
    }
    static long[] nextLongArray(){
        String[] inp = nextLine().split("\\s+");
        long[] ary = new long[inp.length];
        for (int i = 0; i < inp.length; i++){
            ary[i] = Long.parseLong(inp[i]);
        }
        return ary;
    }
    static long[] nextLongArrayFrom1(){
        String[] inp = nextLine().split("\\s+");
        long[] ary = new long[inp.length + 1];
        for (int i = 0; i < inp.length; i++){
            ary[i+1] = Long.parseLong(inp[i]);
        }
        return ary;
    }
	static String nextLine(){
		try {
			return reader.readLine().trim();
		} catch (Exception e){}
		return null;
	}
}

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		int n = new Scanner(System.in).nextInt();
		int sum = 0;
		for (int i = 2; i < n; ++i) {
			String str = Integer.toString(n, i);
			for(char c : str.toCharArray()){
				sum += c - (c<96 ? 48 : 87);
			}
		}
		System.out.println(sum +"/"+(n-2));
	}
}

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        for (int i = 2; i < n; i++) {
            sum += top(i,n);
        }
        int g = gcd(sum, (n-2));
        System.out.println(sum+"/"+(n-2));
    }
    static public int top (int n, int m ){
        int ans = 0;
        while (m >= n){
            ans += m%n;
            m = m/n;
//          System.out.println(ans+" --2 "+m);
        }
        ans += m;
        return ans;
    }
    static public int gcd (int a, int b){
        return (b == 0)? a:gcd(b, a%b);
    }
}

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner ss=new Scanner(System.in);
        //int t=ss.nextInt();
        //while(t-->0){
            int num=ss.nextInt();
            int sum=0;
            for(int i=2;i<num;i++){
                sum+=sumn(jinzhi(i,num));
            }
            System.out.println(sum+"/"+(num-2));
        }
    //}
    public static int pow(int num,int m){
        int sum=1;
        for(int i=0;i<m;i++){
            sum*=num;
        }
        return sum;
    }
    public static int jinzhi(int base,int num){
        int sum=0,n=0;
        do{
            sum+=(num%base)*pow(10,n);
            num/=base;
            n++;
        }while((num/base)!=0);
        sum+=(num%base)*pow(10,n);
        return sum;
    }
    public static int sumn(int num){
        int sum=0;
        while(num!=0){
            sum+=num%10;
            num/=10;
        }
        return sum;
    }
}

import java.util.*;
public class A13 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt(), counter = 0;
		for(int i = 2; i < num; i++) {
			counter += base(num,i);
		}
		System.out.println(counter+"/"+(num-2));
	}

	public static int base(int num, int base) {
		int sum = 0;
		while(num >= base) {
			sum = sum + (num % base);
			num /= base;
		}
		sum += num;
		return sum;
	}
}

import java.util.*;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Vishwa Raval
 */
public class Numbers {
    static int sumOfDigit(int n, int base){

        int result=0;

        while (n>0){
            int remainder=n%base;
            result+=remainder;
            n=n/base;
        }
        return result;
    }

    static int addition(int n){
        int sum=0;
         for(int base=2;base<n;++base){
             sum=sum+sumOfDigit(n, base);
         }
         return sum;
    }

    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);

        int n=input.nextInt();

        System.out.println(addition(n)+"/"+(n-2));
    }
}

import java.util.*;
import java.io.*;

 public class A13{
 	static int gcd(int a,int b){
 		if(a==0)return b;
 		if(b==0)return a;
 		if(a==1||b==1)return 1;
 		int k=0;
 		while(((a|b)&1)==0){
 			k++;
 			a>>=1;
 			b>>=1;
 		}
 		while((a&1)==0)
 			a>>=1;
 		do{
 			while((b&1)==0)
 				b>>=1;
 			if(a>b){
 				int temp=a;
 				a=b;
 				b=temp;
 			}
 			b=b-a;
 		}
 		while(b!=0);
 		return a<<k;
 	}
	public static void main(String args[])throws IOException{
		Scanner sc=new Scanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=sc.nextInt();
		int sum=0;
		for(int i=2;i<n;i++){
			String s=Integer.toString(n,i);
			for(char ch:s.toCharArray()){
				sum+=ch-48;
			}
		}
		int gcd=gcd(sum,n-2);
		pw.println(sum/gcd+"/"+(n-2)/gcd);
		pw.close();
	}
}

import java.util.PriorityQueue;
import java.util.Scanner;

public class dq {

	public static int check(int a,int b) {

		int sum = 0;
		while(a>=b) {
			sum+=(a%b);
			a=a/b;
		}
		sum+=a%b;
		return sum;
	}
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);

		int a = s.nextInt();
		int sum = 0;
		for(int i=2;i<a;i++) {
			sum+=check(a,i);
		}
		System.out.println(sum+"/"+(a-2));

	}
}
class Pair implements Comparable<Pair>{
	int x,y;

	Pair(int x,int y){
		this.x=x;
		this.y=y;
	}
	public int compareTo(Pair o) {
		if(this.y>o.y) {
			return 1;
		}
		return -1;
	}
}