N = int(input()) for i in range(N+1, 0, -1): if N % (i ** 2) == 0: print(i, N // (i ** 2)) break