#include #define int long long //#define USE_FREOPEN //#define MUL_TEST #define FILENAME "game" using namespace std; void solve() { int h, w, n, k; cin >> h >> w >> n >> k; if ((k % n) == ((h + w - 1) % n)) cout << "YES\n"; else cout << "NO\n"; } signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); #ifdef USE_FREOPEN freopen(FILENAME ".in","r",stdin); freopen(FILENAME ".out","w",stdout); #endif int _ = 1; #ifdef MUL_TEST cin >> _; #endif while (_--) solve(); _^=_; return 0^_^0; }