import math

n = int(input())
m = 1

n //= m 
a = 1
i = int(math.sqrt(n))
while(i >= 1):
    if((n % i) == 0 and math.gcd(i, n//i) == 1):
        a = i
        break
    i -= 1

print(a*m, int((n/a)*m))
