from math import sqrt
def gcd(a,b):
    # Everything divides 0  
    if (b == 0): 
         return a 
    return gcd(b, a%b) 
    
def lcm(a,b):
    return (a*b)/gcd(a,b)
    
def solve():
    x=int(input())
    m=x
    a=[1,x]
    for i in range(1,int(sqrt(x))+1):
        if x%i==0:
            if lcm(i,x/i)==x:
                m=min(m,max(i,x/i))
                a=[i,x/i]
            
    print(a[0],' ',int(a[1]))
    
for _ in range(1):
    solve()