import math
def main():
    n=int(input())
    min=1000000000000+1
    a=1
    b=1
    for i in range(1,int(n**0.5)+1):
    	if(n%i==0):
    		if(math.gcd(i,n//i)==1 and max(i,n//i)<min):
    			min=max(i,n//i)
    			a=i
    			b=n//i
    print(a,b)

main()