#include <bits/stdc++.h>
using namespace std;
vector<long long int> bin_s(long long int k, long long int d1, long long int d2,
                            long long int a, long long int b) {
  long long int lo = 0, hi = k + 1;
  while (lo < hi) {
    long long int mid = (lo + hi) / 2;
    long long int x = mid + (a * d1);
    long long int y = mid;
    long long int z = mid + (b * d2);
    if (x >= 0 && y >= 0 && z >= 0 && (x + y + z) == k)
      return vector<long long int>({x, y, z});
    else if (x < 0 || y < 0 || z < 0 || (x + y + z) < k)
      lo = mid + 1;
    else
      hi = mid;
  }
  return vector<long long int>({-1000});
}
bool check(vector<long long int> A, long long int n) {
  sort(A.begin(), A.end());
  n -= (A[2] - A[0]);
  n -= (A[2] - A[1]);
  return n >= 0 && (n % 3 == 0);
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, k, d1, d2;
    cin >> n >> k >> d1 >> d2;
    vector<long long int> A = bin_s(k, d1, d2, 1, 1);
    if ((A.size() == 3) && check(A, n - k)) {
      cout << "yes" << endl;
      continue;
    }
    A = bin_s(k, d1, d2, -1, 1);
    if ((A.size() == 3) && check(A, n - k)) {
      cout << "yes" << endl;
      continue;
    }
    A = bin_s(k, d1, d2, 1, -1);
    if ((A.size() == 3) && check(A, n - k)) {
      cout << "yes" << endl;
      continue;
    }
    A = bin_s(k, d1, d2, -1, -1);
    if ((A.size() == 3) && check(A, n - k)) {
      cout << "yes" << endl;
      continue;
    }
    cout << "no" << endl;
  }
}
