#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  for (long long h = 0; h < (long long)t; h++) {
    long long n;
    long long a[3];
    for (long long i = 0; i < (long long)3; i++) cin >> a[i];
    cin >> n;
    long long s = a[0] + a[1] + a[2] + n;
    sort(a, a + 3);
    if (s % 3 || a[2] > s / 3)
      cout << "NO";
    else
      cout << "YES";
    cout << "\n";
  }
  return 0;
}
