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