#include using namespace std; int t,n; int Max,Min,Ave; bool solve(){ if(Min<=Max){ if(n==1){ if(Min==Max&&Min==Ave){ return true; }else{ return false; } } if(n==2){ if(Min+Max==Ave*2){ return true; }else{ return false; } } int temp = n*Ave - Max - Min; if(temp >= Min * (n - 2)&&temp <= Max * (n - 2)){ return true; }else{ return false; } }else{ return false; } return false; } int main(){ ios::sync_with_stdio(0); cin>>t; while(t--){ cin>>n>>Max>>Min>>Ave; cout<<(solve()?"yes\n":"no\n"); } return 0; }