#include #include #include #include #include #include #include #include #include #include #include #include #include #define mem(a,n) memset(a,n,sizeof a) #define endl '\n' #define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); #define SYS system("pause"); #define For(i, n) for (int i = 0; i< n;i++) #define FOR(i, n) for (int i = 1; i <= n;i++) #define rFor(i, n) for (int i = n; i > 0;i--) using namespace std; typedef long long ll; typedef pair PII; ll gcd(ll a,ll b){ll d; while(b){ d=b; b=a%b; a=d; } return a;} ll lcm(ll a,ll b){return a/gcd(a,b)*b;} ll qpow(ll x, ll y) { ll ans = 1; for (; y > 0; y >>= 1) { if (y & 1)ans *= x; x *= x; } return ans;} ll qpow(ll x, ll y, int MOD) { ll ans = 1; for (; y > 0; y >>= 1) { if (y & 1)ans = ans*x%MOD; x = x*x%MOD; } return ans;} void exgcd(int a,int b,int &x,int &y){ if(b==0){ x=1;y=0;return; } exgcd(b,a%b,x,y); int temp=y; y=x-(a/b)*y, x=temp; return;} int downcheck(int l, int r){ while (l < r){ int mid = l + r >> 1; if ("check(mid)") r = mid; else l = mid + 1; } return l;} int upcheck(int l, int r){ while (l < r){ int mid = l + r + 1 >> 1; if ("check(mid)") l = mid; else r = mid - 1;} return l;} int doublecheck(int l,int r){ while(r-l>1e-8){ int mid=(l+r)>>1; if("check(mid)") l=mid; else r=mid;} return l; } const int N = 1e6+10,M=20; const int inf=0x3f3f3f3f; const int mod=1e9+7; const double pi = acos(-1.0); ll n,x,t,m; int main(){ IOS cin >> t; while(t--){ ll a, b, c, d; cin >> n >> a >> b >> c; ll res1 = a * (n - 1) + b; ll res2 = b * (n - 1) + a; if(b>a||c>a||c=res2){ cout << "yes" << endl; } else cout << "no" << endl; } // SYS return 0; }