def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)

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

x = int(input())
minn = x
for i in range(1, int(x**0.5)+1):
    if x%i==0 and lcm(i, x//i) == x:
        minn = min(minn, max(i, x//i))
print(x//minn, minn)
