using System;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            var ss = Console.ReadLine().Split();
            int n = int.Parse(ss[0]);
            int m = int.Parse(ss[1]);

            ss = Console.ReadLine().Split();
            int x = int.Parse(ss[0]);
            int y = int.Parse(ss[1]);
            Console.WriteLine(U(x, m) == U(y, m) ? "YES" : "NO");
        }

        static int U(int a, int m)
        {
            int c = 0;
            if ((Math.Ceiling((double)a / m) % 2) == 1)c = a % m == 0 ? m : a % m;
            else c = a % m == 0 ? 1 : m - a % m + 1;
            return c;
        }
    }
}