import math

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

n = int(input())
num = int(math.sqrt(n))

fac = n

for i in range(1, num+1):
    if (n%i == 0 and lcm(n//i, i) == n):
        fac = i
        
print(fac, n//fac)