import math
n = int(input())
mu = int(math.sqrt(n))
if n==1:
    print("1 1")
else:
    for i in range(mu,0,-1):
        if n%i==0:
            
            if n//i==i:
                continue
            if ((i*(n//i))//math.gcd(i,n//i)) !=n:
                continue
            print(n//i,i)
            break