def gcd(a,b): 
    if a == 0: 
        return b 
    return gcd(b % a, a) 
  
def lcm(a,b): 
    return (a*b) / gcd(a,b) 
    
x=int(input())
ans=1
for i in range(1,int(pow(x,0.5))+1):
    if(x%i==0 and lcm(i,x/i)==x):
        ans=i
print(ans,int(x/ans))
        