import sys
import math as mt 
input=sys.stdin.buffer.readline
#t=int(input())
t=1
for ___ in range(t):
    x=int(input())
    x1=x
    i=2
    d=[]
    d.append(1)
    while i*i<=x:
        if x%i==0:
            d.append(i)
            if i!=x//i:
                d.append(x//i)
        i+=1
    a,b=10**12+1,10**12+1
    for i in d:
        if mt.gcd(i,x//i)==1:
            if max(i,x//i)<max(a,b):
                a=i
                b=x//i
    print(a,b)        
        
    