# Arup Guha
# 7/16/2025
# Solution to Common Factors
# https://open.kattis.com/problems/commonfactors

import math

# Run a prime sieve just up to 100.
sieve = []
for i in range(100):
    sieve.append(True)
for i in range(2, 100):
    for j in range(2*i,100,i):
        sieve[j] = False

# Store primes up to 100, their product is too big, so we'll cut out.
primelist = []
for i in range(2,100):
    if sieve[i]:
        primelist.append(i)

# When n=2, the minimum ratio of phi(n)/n is 1/2. This is a critical point.
cutpts = [[2,1,2]]

# Build the rest of the critical points.
for i in range(1,len(primelist)):

    # This is the next integer (product of primes upto primelist[i]
    nextterm = cutpts[-1][0]*primelist[i]

    # Calculate new fraction for phi(n)/n
    newnum = cutpts[-1][1]*(primelist[i]-1)
    newden = cutpts[-1][2]*(primelist[i])
    div = math.gcd(newnum, newden)

    # Don't forget to reduce to lowest terms!
    cutpts.append([nextterm,newnum//div,newden//div])

    # Get out we don't need more.
    if nextterm > 10**18:
        break

# Get the input.
n = int(input())

# Process case via searching backwards through cutpoints for the first one
# less than or equal to the input. Remember to output 1 - phi(n)/n...
for i in range(len(cutpts)-1,-1,-1):
    if cutpts[i][0] <= n:
        print(cutpts[i][2]-cutpts[i][1],"/",cutpts[i][2], sep="")
        break


