$><<((_=gets.to_i)**0.5).ceil.downto(1){|i|break('%d %d'%[i,_/i])if _%i==0}