a = input() b = int(a) numList = [2,3,5,7] for num in numList: if b % num == 0: print(num, ' ', b // num) break