#include using namespace std; int main() { int t, n; double max, min, ave; double sum, temp, x; cin >> t; while (t--) { scanf("%d %lf %lf %lf", &n, &max, &min, &ave); if (n < 2) { cout << "no" << endl; } else if (n == 2) { sum = n * ave; if (max < min) { cout << "no" << endl; } else if (max + min == sum) { cout << "yes" << endl; } else { cout << "no" << endl; } } else { sum = n * ave; temp = sum - max - min; x = temp / (n - 2); if (max < min) { cout << "no" << endl; } else if (max >= x && min <= x) { cout << "yes" << endl; } else { cout << "no" << endl; } } } }