#include using namespace std; const int maxn =2e6+5; const int mod=1e9+7; #define ll long long #define IOS ios::sync_with_stdio(false),cin.tie(0) int main(){ IOS; int t; cin>>t; while(t--){ int n,ma,mi,av; cin>>n>>ma>>mi>>av; if(n==2){ if(ma>=mi&&ma+mi==2*av){ cout<<"yes\n"; } else cout<<"no\n"; } else if(n==1){ if(ma==mi&&mi==av){ cout<<"yes\n"; } else cout<<"no\n"; } else{ if(n*av>=(n-2)*mi+ma+mi&&(n-2)*ma+ma+mi>=n*av) cout<<"yes\n"; else cout<<"no\n"; } } return 0; }