#include #include #include using namespace std; typedef long long int ll; int main() { int T; int a,b,c,d; cin>>T; while(T--) { cin>>a>>b>>c>>d; if(bd) { printf("no\n"); } else if(b==c&&c==d) { printf("yes\n"); } else if(a==2) { if(d*2==(b+c)) { printf("yes\n"); } else { printf("no\n"); } } else { if((a-2)*c<=(a*d-(b+c))&&(a*d-(b+c))<=(a-2)*b) { printf("yes\n"); } else { printf("no\n"); } } } return 0; }