#include using namespace std; int t; int n, ma, mi, av; int main() { scanf("%d", &t); for(int i = 0; i < t; i++) { scanf("%d %d %d %d", &n, &ma, &mi, &av); double sum = n * av; if (mi > ma) { cout << "no" << endl; continue; } if (n == 1) { if (ma == mi && mi == av) { cout << "yes" << endl; } else { cout << "no" << endl; } } else if (n == 2) { if (ma + mi == av * 2) { cout << "yes" << endl; } else { cout << "no" << endl; } } else { sum -= ma; sum -= mi; if (sum / (n - 2) >= mi && sum / (n - 2) <= ma) { cout << "yes" << endl; } else { cout << "no" << endl; } } } return 0; }