import math

def gcd(a,b): 
    if (b == 0): 
         return a 
    return gcd(b, a%b)

x=int(input())
t=int(math.sqrt(x))
for i in range(t,0,-1):
	if(x%i==0 and gcd(int(x/i),i)==1):
		a=int(i);
		b=int(x/i);
		break;
print(a,b)