def run m, n = gets.strip.split(" ").map { |x| x.to_i } xx, yy = gets.strip.split(" ").map { |x| x.to_i } m *= 2 if (xx - yy)%m == 0 or (xx + yy -2)%m = m - 1 then puts "YES" else puts "NO" end end run()