from math import *
from fractions import *

x = int(input())

r = ceil(sqrt(x))
r = r -1

a,b = 0,0

for i in range(r,0,-1):
    if(x%i == 0):
        a,b = i,x//i
        g = gcd(a,b)
        if(g == 1):
            break
        else:
            a,b = 0,0
            continue
            
if(x == 1):
    print(1,1)
else:
    print(a,b)