#include using namespace std; using ll = long long; using PII = pair; const int N = 1e5 + 5, mod = 1e9 + 7; int T, n, ma, mi, ave; int main() { ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); cin >> T; while(T--) { cin >> n >> ma >> mi >> ave; int sum = n * ave; bool tag = false; if(n == 1) { if(ma == mi && ma == ave) tag = true; } else if(n == 2) { if(ma >= mi && sum == ma + mi) tag = true; } else { int x = sum - ma - mi; double y = 1.0 * x / (n - 2); if(ma >= mi && y >= mi && y <= ma) tag = true; } if(tag) cout << "yes\n"; else cout << "no\n"; } return 0; }