from math import gcd,sqrt,floor
def lcm(x,y):
    return x*y // gcd(x,y)

X = int(input())
sqX = floor(sqrt(X))
for i in range(sqX,0,-1):
    if X/i == X//i:
        if lcm(i,X//i) == X:
            print(i, X//i)
            break
