#include using namespace std; #define ll long long #define db double #define X first #define Y second #define rep(i,a,b) for(int i=(a);i<=(b);++i) #define rep0(i,a,b) for(int i=(a);i<(b);++i) #define per(i,a,b) for(int i=(a);i>=(b);--i) #define fore(i,a) for(int i=0;i>=1,a=1ll*a*a%P)if(b&1)r=1ll*r*a%P;return r; } */ int main() { int T=rd(); while(T--) { int n,mn,mx,ave; n=rd();mx=rd();mn=rd();ave=rd(); if(mn>ave||ave>mx){puts("no");continue;} if(n==1) { if(mn==mx)puts("yes"); else puts("no"); continue; } if(n==2) { if(mn+mx==ave*2)puts("yes"); else puts("no"); continue; } int tl=(n-1)*mn+mx,tr=(n-1)*mx+mn; int tm=n*ave; if(tl<=tm&&tm<=tr)puts("yes"); else puts("no"); } return 0; }