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