#include <bits/stdc++.h>
using namespace std;
long long imax(long long a, long long b) {
  if (a > b) return a;
  return b;
}
int main() {
  long long t, i;
  long long a, b, c, n, sum, tmp;
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> a >> b >> c >> n;
    tmp = imax(a, imax(b, c));
    sum = (a + b + c + n) % 3;
    if (sum == 0 && (3 * tmp - a - b - c) <= n)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
