def pgcd(a,b):
    if b==0:
        return a
    else:
        r=a%b
        return pgcd(b,r)
n=int(input())
n2=int(n**0.5)
test=False
while (n2>0):
          if n%n2==0 and (n//n2)%n2!=0 and pgcd(n2,n//n2)==1:
                    print(n2,n//n2)
                    test=True
                    break
          n2-=1
if test==False:
          print(1,n)