import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np M = int(read()) x = np.arange(1,10**6 + 10) div = x[M % x == 0] div = np.union1d(div, M//div) if len(div) <= 2: print(1, M) else: x = div[1] print(x, M//x)