#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); int t; scanf("%d",&t); while(t--) { double n,maxx,minn,ave; scanf("%lf%lf%lf%lf",&n,&maxx,&minn,&ave); double sum=ave*n; //cout<=maxx+(n-1)*minn&&sum<=minn+(n-1)*maxx) cout<<"yes"<