import math
n = int(input())
ans = float('inf')
if n==1:
    print(1,1)
else:
    for i in range(1,int(math.sqrt(n))+1):
    	if(n%i==0):
    		p = max(i,n//i)
    		g = n/math.gcd(i,n//i)
    		if(i!=n//i) and g==n:
    			ans = min(ans,p)
    print(n//ans,ans)