M = int(input()) for n in range(2, M + 1): m, r = divmod(M, n) if r == 0: print('{} {}'.format(n, m)) break if n > m: print('1 {}'.format(M)) break if M == 1: print('1 1')