x=int(input())
a=1
def gcd(a,b):
    """Compute the greatest common divisor of a and b"""
    while b > 0:
        a, b = b, a % b
    return a
    
def lcm(a, b):
    """Compute the lowest common multiple of a and b"""
    return a * b / gcd(a, b)
for i in range(2,int(x**.5+1)):
    if x%i==0:
        if lcm(i,x//i)==x:
            a=i
print(a,x//a)
