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 copy
from fractions import Fraction
#Function to convert the number into another base
def convert(number, base):
    #We will operate over a copy of the original number, because we
    #will be using the same number in other procedures
       c_num = copy.deepcopy(number)
       #We will keep the digits of the converted number in a list
       rest = []
       #The actual magic happens here:
       while c_num:
              rest.append(c_num%base)
              c_num //= base
       return rest
#Function that finds the sum of the numbers we've previously stored in rest[]
def digits_sum(numbers):
    #We start off with a sum of zero
       d_sum = 0
       #and we add each number to the final sum of the digits,
       #using the following "for" loop
       for number in numbers:
              d_sum += number
       return d_sum
#Function to find the sum of all numbers from base 2 until number-1
def all_s(number):
    #We start with base 2:
       i = 2
       total = 0
       while i != number:
           #And we apply the previous function to all bases from 2 to number-1
              total += digits_sum(convert(number, i))
              #And we increase the base as we go
              i += 1
       return total
#The main function that puts all the previous functions together
def result():
        #Get the number 
        number = int(input())
        #Calculate the final sum, using the all_s() function 
        total = all_s(number)
        #We use the Fraction method to get a rational output
        out = Fraction(total,number-2)
        #Delicate situation: "Fraction" does not output whole numbers
        #in form of fractions. For instance: Fraction(2,1)>>2
        #So, if "out" is not a whole number, we simply print(out)
        if total%(number-2)!=0:
            print(out)
        #If "out" is a whole number, we print "out/1"
        else:
            print("{}/1".format(out))
result()