#include using namespace std; typedef long long ll; int main(void) { #ifdef DEBUG freopen("input.txt", "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); int N, M, X, Y; cin >> N >> M; cin >> X >> Y; int class_[2]; int i = 0; for (int j : {X, Y}) { int d = (j - 1) / M; int m = (j - 1) % M; if (d % 2) { class_[i] = M - m; } else { class_[i] = m + 1; } i++; } if (class_[0] == class_[1]) cout << "YES" << endl; else cout << "NO" << endl; return 0; }