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

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

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

Input

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

Output

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

Examples

Input

5


Output

7/3


Input

3


Output

2/1

Note

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

import java.util.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;
	}
	
	/*
	 * @param a number
	 * @param b number
	 * @return greatest common divisor of a and b
	 */
	private static int GCD(int a, int b) {
		if (b == 0) {
			return a;
		}
		return GCD(b, a%b);
	 }
	
	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;
		
		// Number of bases tried
		int numBase = input - 2;
		
		// Start finding the sum of all bases
		for(int i = 2; i < input; i++) {
			int currentNumInBase = base(input, i);
			sum += currentNumInBase;
		}
		
		
		// Find greatest common divisor of sum and input
		int gcd = GCD(sum, numBase);
		
		// Divide both numbers by GCD
		sum /= gcd;
		numBase /= gcd;
		
		// Print input
		System.out.println(sum + "/" + numBase);
	}
}
