N = gets.to_i puts (1 .. 10).map{|a| N - a <= 10 ? "#{a} #{N - a}" : nil}.find(&:itself)