/* -*- coding: utf-8 -*- * * 396.cc: No.396 クラス替え - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ inline int cnum(int a, int m) { return ((a / m) & 1) ? m - 1 - a % m : a % m; } /* main */ int main() { int n, m, x, y; cin >> n >> m >> x >> y; x--, y--; cout << (cnum(x, m) == cnum(y, m) ? "YES" : "NO") << endl; return 0; }