#!/usr/bin/env python #coding:UTF-8 M = int(raw_input()) a = 1 sw = 0 count = 0 for i in range(1,M): if M % i == 0: b = i if a == b: print str(a) + " " + str(M) else: print str(b) + " " + str(M / b)