m=int(input()) if m % 2 == 0: print(2, int(m/2)) exit() for x in range(3, int((m**0.5)+2)): if (m % x == 0): print(x, int(m/x)) exit() print(1, m)