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