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

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

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

Input

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

Output

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

Examples

Input

5


Output

7/3


Input

3


Output

2/1

Note

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

import java.io.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 ans = 0;
		for (int i = 2; i <= n - 1; ++i) {
			int num = n;
			int cnt = 0;
			while (num > 0) {
				int t = num % i;
				cnt += t;
				num /= i;
			}
			ans += cnt;
			System.err.println("base " + i + "sum " + cnt);
		}

		int div = gcd(ans, n - 2);
		ans /= div;
		int num = n - 2;
		num /= div;
		pw.println(ans + "/" + num);
	}

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

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