import math
n=int(input())
s=int(math.sqrt(n))
l=[]
for i in range(1,s+1):
    l2=[]
    if(n%i==0):
        l2.append(i)
        l2.append(n//i)
        l.append(l2)
l3=[]
for i in l:
    if(math.gcd(i[1],i[0])==1):
        l3.append(i)
if(len(l3)==0):
    print(1,n)
else:
    l3.sort(key = lambda x: x[1])
    print(*l3[0])

    
