from math import gcd
p=int(input())
a=[]
b=[]
i=1
while i*i<=p:
    if p%i==0:
        a.append(i)
        b.append(int(p/i))
    i+=1

a.reverse()
b.reverse()

for i in range (len(a)):
    if gcd(int(a[i]),int(b[i]))==1:
        print(a[i],b[i])
        quit()