import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) a, b = 1, N for i in range(1, N + 1): if i * i > N: break d = i * i if N % d == 0: a, b = i, N // d print(a, b)