n=int(input())
lim=int(n**0.5)
count=0
ans=list()
if(n==1):
    print(1,1)
else:
    for i in range(lim, 0, -1):
        if(n/i==i and n%i==0):
            ans=ans+[i]
        elif n%i==0:
            ans=[i]+ans+[n//i]
    l=len(ans)
    #print(ans)
    if(l%2==0):
        a1=(l//2)-1
        a2=l//2
    else:
        a1=(l//2)-1
        a2=(l//2)+1
    while((n//ans[a1])%2==0 and (n//ans[a2])%2==0):
        a1=a1+1
        a2=a2+1
    print(ans[a1], ans[a2])