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

x = int(input())
a = 1 
b = x
z = 2
while(x//z > z):
    if(x%z == 0):
        if(gcd(z, x//z)) == 1:
            if(max(z, x//z) < max(a, b)):
                a = z
                b = x//z
    z += 1
t = []
t.append(a)
t.append(b)
print(*t)