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