#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; cin >> n; long long mx, mn, ave; cin >> mx >> mn >> ave; if (mn > mx) { cout << "no" << '\n'; continue; } if (n == 1) { if (mx == mn && mx == ave) { cout << "yes" << '\n'; } else { cout << "no" << '\n'; } } else { long long l = 0; long long r = 0; l += mn; l += mx; r += mn; r += mx; l += mn * (n - 2); r += mx * (n - 2); if (l <= ave * n && ave * n <= r) { cout << "yes" << '\n'; } else { cout << "no" << '\n'; } } } }