import math

x = int(input())
n = int(math.sqrt(x))
for i in reversed(range(1,n+1)):
    if x%i==0:
        a = math.gcd(i,x//i)
        if a==1:
            print(i,x//i)
            exit()
        else:
            continue