import math
n=int(input())
if n==2:
    print(1,2)
elif n==1:
    print(1,1)
else:
    x=[]
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            x.append(i)
    
    y=len(x)
    c=x[y-1]
    v=x[y-2]
    h=min(c,v)
    if h==1:
        k=c
    else:
        k=h
    if k==n//k:
        print(1,n)
    else:
        print(k,n//k)
                   
            
