#include #include #include #include #include #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, M, X, Y; cin >> N >> M >> X >> Y; X--, Y--; int r1 = X / M, r2 = Y / M; if(r1 % 2 == r2 % 2) { if(X % M == Y % M) { cout << "YES" << endl; } else { cout << "NO" << endl; } } else { if(X % M == (M - 1 + Y) % M) { cout << "YES" << endl; } else { cout << "NO" << endl; } } }