from math import sqrt
def pgcd(a,b):
    while b!=0:
        r=a%b
        a,b=b,r
    return a
def ppcm(a,b):
    if (a==0) or (b==0):
        return 0
    else:
        return (a*b)//pgcd(a,b)
n=int(input())
l=[]
y=[]
for i in range(1,int(sqrt(n))+1):
    if n%i==0:
        l.append(i)
        y.append(n//i)
for i in range(len(l)-1,-1,-1):
    if ppcm(l[i],y[i])==n :
        a=l[i]
        b=y[i]
        break
print(a,b)

        
               
