#include #include #include using namespace std; int main() {long long test,n,max,min,ave,x1; long long x2,x3; cin>>test; for(x1=0;x1>n>>max>>min>>ave; if(max>=min&&max>=ave&&min<=ave) { if(n==1) {if(max==min&&max==ave) cout<<"yes"<2) {x2=(max+(n-1)*min); x3=(max*(n-1)+min); if(x2<=ave*n&&x3>=ave*n) cout<<"yes"<