import math
def isrp(a, b):
	if a==1 or b==1: 
		return True;
	while(1):         
		t = a%b;
		if t == 0:
		    break
		else:
			a = b
			b = t
		
	
	if b>1:
	    return False
	else:
	    return True	
x = int(input())
xn = int(math.sqrt(x))+1
# print(xn)
for i in range(0,xn-1):
    nn = xn-i
    if x%nn==0 and isrp(nn,int(x/nn)):
        print(nn,end=' ')
        print(int(x/nn))
        break
    if i == xn-2:
        print(1,end=' ')
        print(x)
# print(1)
# print(x)