def solve x, m tmp = x - 1 if tmp / m % 2 == 0 return tmp % m + 1 else return m - tmp % m end end n, m = gets.split.map(&:to_i) x, y = gets.split.map(&:to_i) if solve(x, m) == solve(y, m) puts "YES" else puts "NO" end