#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define int long long signed main() { int h, w, n, k; cin >> h >> w >> n >> k; //h + w - 1 回順番が回る //h + w - 1 回目の人が負け int last = (h + w - 1) % n; if (last == 0)last = n; if (last == k) { cout << "YES" << endl; }else { cout << "NO" << endl; } return 0; }