#include #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) for(int i = 0; i < (n); ++i) using namespace std; typedef long long ll; const int INF = 1e9; const double PI = acos(-1.0); int func(int N, int M, int X) { int x = X % M; int y = X / M; if(x == 0) { if(y % 2) return M; else return 1; } else { if(y % 2) return M - x + 1; else return x; } } int main(void) { cin.tie(0); ios::sync_with_stdio(false); int N, M; int X, Y; cin >> N >> M; cin >> X >> Y; if(func(N, M, X) == func(N, M, Y)) cout << "YES"; else cout << "NO"; return 0; }