#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &a) {
  cin >> a;
}
template <typename T, typename T1>
void read(T &a, T1 &b) {
  cin >> a >> b;
}
template <typename T, typename T1, typename T2>
void read(T &a, T1 &b, T2 &c) {
  cin >> a >> b >> c;
}
template <typename T, typename T1>
void read(pair<T, T1> &p) {
  cin >> p.first >> p.second;
}
template <typename T>
void read(T arr[], long long n) {
  for (long long i = 0; i < n; i++) {
    read(arr[i]);
  }
}
template <typename T>
void read(vector<T> &arr) {
  for (long long i = 0; i < arr.size(); i++) {
    read(arr[i]);
  }
}
long long modularExponentiation(long long x, long long n, long long M) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return modularExponentiation((x * x) % M, n / 2, M);
  return (x * modularExponentiation((x * x) % M, (n - 1) / 2, M)) % M;
}
long long binaryExponentiation(long long x, long long n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return binaryExponentiation(x * x, n / 2);
  else
    return x * binaryExponentiation(x * x, (n - 1) / 2);
}
long long GCD(long long A, long long B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
long long extended_GCD(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
long long modinv(long long a, long long mod) {
  long long x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0) x += mod;
  return x;
}
long long modPrimeInverse(long long A, long long M) {
  return modularExponentiation(A, M - 2, M);
}
void sieve(long long N) {
  bool isPrime[N + 1];
  for (long long i = 0; i <= N; ++i) {
    isPrime[i] = true;
  }
  isPrime[0] = false;
  isPrime[1] = false;
  for (long long i = 2; i * i <= N; ++i) {
    if (isPrime[i] == true) {
      for (long long j = i * i; j <= N; j += i) isPrime[j] = false;
    }
  }
}
void factorSieve(long long n) {
  long long minPrime[n + 1];
  memset(minPrime, 0, sizeof(minPrime));
  for (long long i = 2; i * i <= n; ++i) {
    if (minPrime[i] == 0) {
      for (long long j = i * i; j <= n; j += i) {
        if (minPrime[j] == 0) {
          minPrime[j] = i;
        }
      }
    }
  }
  for (long long i = 2; i <= n; ++i) {
    if (minPrime[i] == 0) {
      minPrime[i] = i;
    }
  }
}
vector<long long> factorize(long long n, long long minPrime[]) {
  vector<long long> res;
  while (n != 1) {
    res.push_back(minPrime[n]);
    n /= minPrime[n];
  }
  return res;
}
void merge(long long A[], long long start, long long mid, long long end) {
  long long p = start, q = mid + 1;
  long long Arr[end - start + 1], k = 0;
  for (long long i = start; i <= end; i++) {
    if (p > mid)
      Arr[k++] = A[q++];
    else if (q > end)
      Arr[k++] = A[p++];
    else if (A[p] < A[q])
      Arr[k++] = A[p++];
    else
      Arr[k++] = A[q++];
  }
  for (long long p = 0; p < k; p++) {
    A[start++] = Arr[p];
  }
}
void merge_sort(long long A[], long long start, long long end) {
  if (start < end) {
    long long mid = (start + end) / 2;
    merge_sort(A, start, mid);
    merge_sort(A, mid + 1, end);
    merge(A, start, mid, end);
  }
}
long long binarySearch(long long a[], long long low, long long high,
                       long long key) {
  while (low <= high) {
    long long mid = (low + high) / 2;
    if (a[mid] < key) {
      low = mid + 1;
    } else if (a[mid] > key) {
      high = mid - 1;
    } else {
      return mid;
    }
  }
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    long long k = s % n;
    long long f = s / n;
    long long x = min(f, a);
    s -= (x * n);
    if (s > b) {
      cout << "NO"
           << "\n";
    } else {
      cout << "YES"
           << "\n";
    }
  }
}
