from math import sqrt M = int(raw_input()) for i in xrange(2,int(sqrt(M))+2): if M % i == 0: print i,M/i break else: print 1,M