m = int(input()) if m % 2 == 0: print(2, m // 2) else: a = 1 b = m i = 3 while i * i <= m: if m % i == 0: a = i b = m // i break i += 2 print(a, b)