n = gets.chomp if n == 2 then puts 0 puts "Yes" else puts (n[-1].to_i % 2 == 0 ? 0 : 1) puts "No" end