import math

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

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


n=int(input())

ans=n

n2=int(math.sqrt(n))

if n2*n2!=n:
    n2+=1


for i in range(2,n2):
    if n%i==0 and lcm(i,n//i)==n:
        ans=min(ans,max(i,n//i))
x,y=ans,n//ans
if x>y:
    x,y=y,x
print(x,y)
