def f(x): q = x // M if q % 2: return M - 1 - x % M else: return x % M N, M = map(int, input().split()) X, Y = map(int, input().split()) X, Y = X - 1, Y - 1 print("YES") if f(X) == f(Y) else print("NO")