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