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=[]
#print(l)
for i in l:
    if(i[1]%i[0]!=0):
        l3.append(i)
if(len(l3)==0):
    print(1,n)
else:
    l3.sort(key = lambda x: x[1])
    #print(l3)
    for i in l3:
        #print(i)
        if int((i[0]*i[1])//math.gcd(i[0],i[1]))==n:
            print(*i)
            break
    
