#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  while (n--) {
    long long total, played, gamestogo;
    cin >> total >> played;
    gamestogo = total - played;
    long long d1, d2;
    cin >> d1 >> d2;
    int status = 0;
    long long a = d1 + d2;
    long long b = d2;
    long long c = 0;
    long long gamestocatchup = (a - b) + (a - c);
    if (a + b + c <= played && (played - a - b - c) % 3 == 0) {
      if (gamestogo >= gamestocatchup && (gamestogo - gamestocatchup) % 3 == 0)
        status = 1;
    }
    a = d1;
    b = 0;
    c = d2;
    if (a + b + c <= played && (played - a - b - c) % 3 == 0) {
      if (d1 >= d2)
        gamestocatchup = max(d1, d2) + d1 - d2;
      else
        gamestocatchup = max(d1, d2) + d2 - d1;
      if (gamestogo >= gamestocatchup && (gamestogo - gamestocatchup) % 3 == 0)
        status = 1;
    }
    a = 0;
    b = d1;
    c = d1 + d2;
    if (a + b + c <= played && (played - a - b - c) % 3 == 0) {
      gamestocatchup = (c - b) + (c - a);
      if (gamestogo >= gamestocatchup && (gamestogo - gamestocatchup) % 3 == 0)
        status = 1;
    }
    a = d2;
    b = d1 + d2;
    c = d1;
    if (a + b + c - 3 * min(d1, d2) <= played &&
        (played - a - b - c) % 3 == 0) {
      gamestocatchup = d1 + d2;
      if (gamestogo >= gamestocatchup && (gamestogo - gamestocatchup) % 3 == 0)
        status = 1;
    }
    if (status == 1)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
}
