def gcd(a,b):
    if a == 0:
        return b
    return gcd(b%a, a)
def lcm(a,b):
    return (a*b)//gcd(a,b)
 
 
def myqs(x):
    i = 1
    a = 1
    while i<=x//i:
        if x%i == 0:
            if lcm(i,x//i)==x:
                a = i
        i += 1
    return (str(a) + " " + str(x//a)) 
x = int(input())
print(myqs(x))