def lcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def solve(x):
    lim = int(x ** (1/2))

    for b in range(lim, 0, -1):
        if x % b == 0:
            a = x // b
            if lcd(a, b) == 1:
                return b, a


inp = int(input())
r = solve(inp)
print('%d %d' % r)

 				 	 				 		  					  		 		