def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)
x=int(input())
tf=True
if int(x**(1/2))==x**(1/2):
    l=int(x**(1/2))-1
else:
    l=int(x**(1/2))

for i in range(l,0,-1):
    if x%i==0:
        if gcd(i,x//i)==1:
            print(i,x//i)
            tf=False
            break
if tf:
    print(1,x)