n = int(input())
i = 1
arr =[]
while i*i < n:
    i+=1
    impl = 1
    while n%i==0:
        impl*=i
        n//=i
    arr.append(impl)
if n!=1:
    arr.append(int(n))
arr.reverse()
a,b=1,1
for i in range(len(arr)):
    if a<=b:
        a*=arr[i]
    else:
        b*=arr[i]
print(a,b)
