#include <bits/stdc++.h>
using lli = long long int;
int main() {
  std::string str;
  lli q, a, b, n, needSum;
  lli ost = 0;
  std::cin >> q;
  for (int i = 0; i < q; ++i) {
    std::cin >> a >> b >> n >> needSum;
    if (a * n == needSum || b == needSum) {
      std::cout << "Yes" << std::endl;
      continue;
    }
    if (a * n > needSum) {
      ost = needSum % n;
      if (b >= ost) {
        std::cout << "Yes" << std::endl;
        continue;
      }
    } else {
      if (a * n + b >= needSum) {
        std::cout << "Yes" << std::endl;
        continue;
      }
    }
    std::cout << "No" << std::endl;
  }
  return 0;
}
