#include #define RAN(v) v.begin(), v.end() #define pb push_back #define lb lower_bound #define ub upper_bound #define I (J + 1) #define J (i + j >> 1) #define P (k << 1) #define S (P ^ 1) using namespace std; typedef long long ll; template inline void upd1(T1& a, const T2& b) { a = a < b ? a : b; } template inline void upd2(T1& a, const T2& b) { a = b < a ? a : b; } ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } struct Ano { operator ll() { ll x = 0, y = 0, c = getchar(); while (c < 48) { y = c == 45; c = getchar(); } while (c > 47) { x = x*10 + c-48; c = getchar(); } return y ? -x : x; } } buf; constexpr int N = 2e5 + 5; int main() { for (int q = buf; q; --q) { ll n = buf, a = buf, b = buf, c = buf; puts(b <= a && (a + b * (n - 1)) <= c * n && c * n <= (a * (n - 1) + b) ? "yes" : "no"); } }