m = int(input()) f = 2 while f * f <= m: if m % f == 0: print(f, m // f) exit() f += 1 print(1, m)