#include using namespace std; typedef long long ll; double n,m,t; int main(){ cin >> t; while(t--) { double max,min; scanf("%lf %lf %lf %lf",&n,&max,&min,&m); double ans=n*m; double k=max*(n-1)+min; double l=min*(n-1)+max; if(min>max){ cout << "no" << endl; continue; } if(ans>=l && ans<=k)cout << "yes" <