#include using namespace std; //struct Date{ // int n,max,min,ave; //}d[100000]; int main() { int text; int n,max,min,ave; cin>>text; for(int i=0;i>n>>max>>min>>ave; if(max=min&&1.0*(ave*n-min)/(n-1)<=max) { cout<<"yes\n"; } else { cout<<"no\n"; } } return 0; }