M = gets.to_i for i in 2..M-1 do result = "#{M/i},#{i}" if M % i == 0 end puts result ? result : "#{M} 1"