import math
x = int(input())
mina = 10**13
a = -1
b = -1

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


for i in range(1,int(math.sqrt(x))+2):
    if(x%i == 0):
        if(gcd(i,x//i) == 1):
            if(max(i,x//i) < mina):
                mina = max(i,x//i)
                a = i
                b = x//i

print(a,end=' ')
print(b)
