def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

def lcm(a, b):
    return a*b//gcd(a, b)

X = int(input())
M = X
ans_a = 1
ans_b = X

for i in range(1, int(X**0.5)+1):
    if X%i==0:
        a = i
        b = X//i
        
        if lcm(a, b)!=X:
            continue
        
        if M>max(a, b):
            M = max(a, b)
            ans_a = a
            ans_b = b

print(ans_a, ans_b)