import math
s=set()
n=int(input())
d={}
l1 =[]
m=10**12
for r in range(1,int(n**0.5)+1):
    if n%r==0:
        if math.gcd(r,n//r)==1:
            if m>max(r,n//r):
                m=max(r,n//r)
                ans=[r,n//r]
print(*ans)