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
#this function transforms any number to any base
def transformToBase(number, base):
       #deepcopy the number because its passed by reference
       #and we don't want to lose it
       newNr = copy.deepcopy(number)
       rest = []
       #while newNr is not 0
       while newNr:
              #store in rest the reminder of division
              rest.append(newNr%base)
              #and in newNr store the integer part
              newNr //= base
       #since we are not interested in transformed number, but only in its digits
       #we don't reverse the number but just return it as it is
       return rest
#we want to find sum of the digits of one number given in a list
def findDigitsSum(numbers):
       digitSum = 0
       #iterate over list
       for number in numbers:
              #calculate sum
              digitSum += number
       return digitSum
#sum of all numbers from base 2 till base n-1
def getFinalSum(number):
       i = 2
       totalSum = 0
       #go from 2 to n-1
       while i != number:
              #add to sum the value returned bu function findDigitsSum
              totalSum += findDigitsSum(transformToBase(number, i))
              i += 1
       #return total sum
       return totalSum
#we want to print the result as an ireductible fraction
def makeFractionIreductible(numerator, denominator):
       #from 2 till numerator, because we know for sure it is bigger than denominator
       for i in range(2, numerator):
              #if the rest of both numerator and denominator after division is 0
              while numerator % i == 0 and denominator % i == 0:
                     #simplify both numerator and denumerator
                     numerator /= i
                     denominator /= i
       #return simplified numerator and denominator
       return numerator, denominator
def main():
       #det input number 
       number = int(input())
       #calculate final sum 
       finalSum = getFinalSum(number)
       #get simplified numerator and denominator
       numerator, denominator = makeFractionIreductible(finalSum,number - 2)
       #print result in fraction form
       result = str(int(numerator)) + "/" + str(int(denominator))
       print(result)
main()