import math
def knapsack(ans,a,n,x,l):
    if n==0:
        if ans!=x and ans!=1:
            l.append(ans)
            return
    else:
        knapsack(ans*a[n-1],a,n-1,x,l)
        knapsack(ans,a,n-1,x,l)
    return l
def solve(n): 
    l=[]
    while n % 2 == 0: 
        l.append(2)
        n = n // 2
    for i in range(3,int(math.sqrt(n))+1,2): 
        while n % i== 0: 
            l.append(i)
            n = n // i 
    if n > 2: 
        l.append(n)
    return l
x=int(input())
pf=solve(x)
if len(set(pf))==1:
    print(1,x)
else:
    ans=knapsack(1,pf,len(pf),x,[])
    ans=list(set(ans))
    d={}
    for i in ans:
        d[i]=x//i
    a=1
    b=x
    final=10**10
    for i in d:
        temp=max(i,d[i])
        if temp<final:
            a=min(i,d[i])
            b=max(i,d[i])
            final=max(i,d[i])
    print(a,b)
