import math
x=int(input())
mi=10**12
for i in range(1,int(x**0.5)+1):
    if x%i==0:
        mi=min(mi,max(i,(x*math.gcd(i,x//i))//i))
print(x*math.gcd((x//mi),mi)//mi,mi)        
            
    
    
    
    