def class_div(a,b,c) ac = 0 if b == 0 then if a.odd? then ac = c else ac = 1 end else if a.odd? then ac = c + 1 - b else ac = b end end end students, classes = gets.split.map(&:to_i) hanako, taro = gets.split.map(&:to_i) h = hanako / classes hd = hanako % classes t = taro / classes td = taro % classes hc = class_div(h, hd, classes) tc = class_div(t, td, classes) if hc == tc then puts "YES" else puts "NO" end