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