#include using namespace std; int main(){ int t,n,a,b,c; for(cin>>t;t;t--){ cin>>n>>a>>b>>c; if(n==1)cout<<(a==b&&b==c?"yes":"no")<<'\n'; else cout<<(a>=b&&(a*(n-1)+b>=c*n&&a+b*(n-1)<=c*n)?"yes":"no")<<'\n'; } return 0; }