import math
num =int(input())
x1 =int(math.sqrt(num))
if num == 1:
    print("1 1")
else:
    for i in range(x1,0,-1):
        if num%i==0:
            if num//i==i:
                continue
            if ((i*(num//i))//math.gcd(i,num//i)) != num:
                continue
            print(num//i,i)
            break