def ascan; gets.split.map(&:to_i);end def bitcount(x) return x.to_s(2).count("1") end n = gets.to_i if n == 1 p -1 exit end 1.upto([n-1,1000].min) do |a| b = n-a if bitcount(b) != 1 && bitcount(a) != 1 puts "#{a} #{b}" exit end end p -1