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


n = int(input())
p = int(pow(n, 0.5))
res = pow(10, 13)
for i in range(1,p + 1):
    if n % i == 0:
        a1 = max(i,n//i)
        a2 = min(i,n//i)
        if gcd(a1,a2)==1 and a1<res:
            res = a1
else:
    print(res,n//res)
