n = int(input())
SquareNum = n ** 0.5
SquareNum = round(SquareNum)
if n == 1:
    print(1,1)
else:
    for i in range(SquareNum,0,-1):
        if n % i == 0 and i ** 2 != n:
            max_num1 = max(i , n // i)
            break
    for x in range(SquareNum,n+1):
        if n % x == 0 and x ** 2 != n:
            max_num2 = max(x , n // x)
            break
    if max_num1 <= max_num2:
        print(i , n // i)
    else:
        print(x , n // x)
