#include <bits/stdc++.h>
using namespace std;
long long int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}
long long int min(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
const int dx[4] = {-1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
int XX[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int YY[] = {-1, 0, 1, -1, 1, -1, 0, 1};
long long int func(long long int x) {
  long long int ans = 0;
  for (long long int i = 2; i * i * i <= x; i++) {
    ans += (x / (i * i * i));
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int k, i, j, m, n, x, y, t, d1, d2, a, b, c;
  cin >> t;
  while (t--) {
    cin >> n >> k >> d1 >> d2;
    long long int x, y, z = 0;
    z = k - (d1 + d2);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x + d1;
      b = x;
      c = x + d2;
      long long int count = 0;
      long long int maxi = max(a, max(b, c));
      count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (d1 - d2);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x + d1;
      b = x;
      c = x - d2;
      long long int count = 0;
      long long int maxi = max(a, max(b, c));
      count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (-d1 - d2);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x - d1;
      b = x;
      c = x - d2;
      long long int count = 0;
      long long int maxi = max(a, max(b, c));
      count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (-d1 + d2);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x - d1;
      b = x;
      c = x + d2;
      long long int count = 0;
      long long int maxi = max(a, max(b, c));
      count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (d2 + d1 + d2);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x + d1 + d2;
      b = x + d2;
      c = x;
      long long int maxi = max(a, max(b, c));
      long long int count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (d2 + d2 - d1);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x - d1 + d2;
      b = x + d2;
      c = x;
      long long int maxi = max(a, max(b, c));
      long long int count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (-d2 - d2 + d1);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x + d1 - d2;
      b = x - d2;
      c = x;
      long long int maxi = max(a, max(b, c));
      long long int count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    z = k - (-d2 - d2 - d1);
    if (z >= 0 && z % 3 == 0) {
      long long int left = n - k;
      x = z / 3;
      a = x - d1 - d2;
      b = x - d2;
      c = x;
      long long int maxi = max(a, max(b, c));
      long long int count = abs(maxi - a);
      count += abs(maxi - b);
      count += abs(maxi - c);
      if (left >= count && a >= 0 && b >= 0 && c >= 0) {
        left -= count;
        if (left % 3 == 0) {
          cout << "yes"
               << "\n";
          continue;
        }
      }
    }
    cout << "no"
         << "\n";
  }
}
