#! usr/bin/env python # -*- coding:utf-8 -*- if __name__ == "__main__": M = raw_input() M = int(M) ans1 = 1 ans2 = M if M % 2 == 0: ans1 = str(M/2) print "2 " + ans1 exit() elif M % 3 == 0: ans1 = str(M/3) print "3 " + ans1 exit() elif M % 5 == 0: ans1 = str(M/5) print "5 " + ans1 exit() elif M % 7 == 0: ans1 = str(M/7) print "7 " + ans1 exit() else: for i in range(8, M/7, 2): if M % i == 0: ans1 = str(M/i) print str(i) + " " + ans1 exit() print str(ans1) + " " + str(ans2)