from math import sqrt, gcd
ans, posx, posy = 1e18, 0, 0
def find(x, y):
    global ans, posx, posy
    if gcd(x, y) == 1:
       if ans > max(x, y):
           ans = max(x, y)
           posx = x
           posy = y
n = int(input())
for i in range(1, int(sqrt(n)+1)):
    if n % i == 0:
        find(i, int(n/i))
print(posx, posy, ' ')