from math import ceil,sqrt
def ii():return int(input())
def mi():return map(int,input().split())
def li():return list(mi())
def si():return input()
def f(n):
    b=[]
    y=int(sqrt(n))
    for i in range(1,y+1):
        if(n%i==0):
            if(i!=n//i):
                b.append(i)
            if(i==n):
                b.append(i)
    x=max(b)
    print(x,n//x)
n=ii()
f(n)