#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define pau system("pause") #define ll long long #define pii pair #define pb push_back #define mp make_pair #define clr(a, x) memset(a, x, sizeof(a)) const double pi = acos(-1.0); const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 7; const double EPS = 1e-9; int t, n, M, m, ave; int main() { scanf("%d", &t); while (t--) { cin >> n >> M >> m >> ave; //cout << (M+m*(n-1)<=ave*n+EPS && m+M*(n-1)>=ave*n-EPS) <=ave*n-EPS) cout << "yes" << endl; else cout << "no" << endl; } } return 0; }