#include <bits/stdc++.h>
using namespace std;
const int maxn = 3000;
const int inf = 0x3f3f3f3f;
inline long long read() {
  long long res = 0, sgn = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    res = res * 10 + c - '0';
    c = getchar();
  }
  return res * sgn;
}
int main() {
  int cases;
  cin >> cases;
  while (cases--) {
    long long a = read(), b = read(), c = read(), n = read();
    if ((n + a + b + c) % 3 == 0) {
      long long ans = (n + a + b + c) / 3;
      if (ans >= a && ans >= b && ans >= c)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  }
}
