x = int(input())
ans = (1, x)
minn = x
for i in range(2, int(x**0.5)+1):
    if x%i==0 and ((x//i)%i!= 0) and (i%(x//i) != 0):
        m = max(x//i, i)
        if m < minn:
            minn = m
            ans = (i, x//i)
print(ans[0], ans[1])