def hcf(a,b):
    if a>b:
        c=a%b
    else:
        c=b%a
    if c==0:
        return min(a,b)
    else:
        return hcf(min(a,b),c)
n=int(input())
j=int(n**0.5)
mx=1
if j**2!=n:
    for i in range(1,j+1):
        if n%i==0 and hcf(i,int(n/i))==1:
            mx=i
else:
    for i in range(1,j):
        if n%i==0 and hcf(i,int(n/i))==1:
            mx=i
print(str(mx)+" "+str(int(n/mx)))