#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using std::cout; using std::cin; using std::string; using std::vector; int main() { int n, m; int x, y; cin >> n >> m; cin >> x >> y; x--; y--; int x_class, y_class; if (x/m % 2 == 0) { x_class = 1 + x%m; } else { x_class = m - x%m; } if (y/m % 2 == 0) { y_class = 1 + y%m; } else { y_class = m - y%m; } if (x_class == y_class) { cout << "YES\n"; } else { cout << "NO\n"; } }