using System; using System.Collections.Generic; using System.Linq; public class Test { public static void Main() { var f = Console.ReadLine() .Split(' ') .Select(x => int.Parse(x)) .ToList(); var s = Console.ReadLine() .Split(' ') .Select(x => int.Parse(x)) .ToList(); var h = ((s[0] - 1) / f[1]) % 2 == 0 ? (s[0] - 1) % f[1] : f[1] - ((s[0] - 1) % f[1]) -1; var t = ((s[1] - 1) / f[1]) % 2 == 0 ? (s[1] - 1) % f[1] : f[1] - ((s[1] - 1) % f[1]) -1; var ans = ""; if(h == t) ans = "YES"; else ans = "NO"; Console.WriteLine(ans); } }