# -*- coding: utf-8 -*- M = int(input()) i = 2 d = 1 while i<=M**(0.5): if M%i == 0: d = i break i += 1 print(d,M//d)