#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T, n, k, a, b;
  cin >> T;
  while (T--) {
    cin >> n >> k >> a >> b;
    n -= k;
    bool flag = 0;
    if (a < b) swap(a, b);
    if ((2 * a + b) <= n && (n - 2 * a - b) % 3 == 0 && (2 * b + a) <= k &&
        (k - 2 * b - a) % 3 == 0)
      flag = 1;
    if (2 * b + a <= n && (n - 2 * b - a) % 3 == 0 && (2 * a + b) <= k &&
        (k - 2 * a - b) % 3 == 0)
      flag = 1;
    if (2 * a - b <= n && (n - 2 * a + b) % 3 == 0 && (a + b) <= k &&
        (k - a - b) % 3 == 0)
      flag = 1;
    if (a + b <= n && (n - a - b) % 3 == 0 && (2 * a - b) <= k &&
        (k - 2 * a + b) % 3 == 0)
      flag = 1;
    if (flag)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
