#include #include #include #include #include #include #include #include #define INF_LL 9000000000000000000 #define INF 2000000000 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) using namespace std; typedef long long ll; typedef pair PII; class Union_find{ private: vector par; vector rank; int n; public: Union_find(int a){ n = a; for(int i = 0;i < n;i++){ par.push_back(i); rank.push_back(0); } } int find(int x){ if(par[x] == x){ return x; }else{ return par[x] = find(par[x]); } } void unite(int x, int y){ x = find(x); y = find(y); if(x == y) return; if(rank[x] < rank[y]){ par[x] = y; }else{ par[y] = x; if(rank[x] == rank[y]) rank[x]++; } } bool same(int x, int y){ return find(x) == find(y); } }; int main(void){ int n, m, x, y; cin >> n >> m >> x >> y; x--; y--; int x_c, y_c; if(x % (2*m) < m){ x_c = x % (2*m) + 1; }else{ x_c = 2*m - (x % (2*m)); } if(y % (2*m) < m){ y_c = y % (2*m) + 1; }else{ y_c = 2*m - (y % (2*m)); } if(x_c == y_c) cout << "YES" << endl; else cout << "NO" << endl; return 0; }