from fractions import Fraction x = float(input()) if x % 1 == 0: print(str(int(x)) + "/1") else: print(Fraction(float(input())))