x = int(input())
from math import gcd
# y = x
arr = []
s = set()
ans = [1, x]
y = x
lo_so_far = x
for i in range(2, int(x**0.5)+2):
    # print(i)
    if x%i==0:
        c = i
        z = x//i
        if x == (c*z)//gcd(c,z):
            lo = max(c,z)
            if lo<lo_so_far:
                lo_so_far = lo
                ans = (c,z)
print(ans[0], ans[1])