N = int(input()) maxAns = N - 1 n = N div = 2 while n % 2 == 0: while n % div == 0: n //= div div += 1 if n > 0: minAns = N // n minAns = N - 1 if N % 2 == 1 else minAns print(minAns,maxAns)