#include using namespace std; int t,n,Min,Max,Ave; int main() { scanf("%d",&t); while(t--) { scanf("%d%d%d%d",&n,&Max,&Min,&Ave); if(Min>Max) { printf("no\n"); continue; } if(Ave*n > (n-1)*Max+Min || Ave*n < (n-1)*Min+Max) printf("no\n"); else printf("yes\n"); } }