from decimal import * import math n = int(input()) a = math.floor(n**0.5+1) while n%a**2 != 0 or a < 1: a -= 1 b = int(n/a**2) print(a,b)