#include <bits/stdc++.h>
using namespace std;
void rwFile() {
  freopen("INP.inp", "r", stdin);
  freopen("OUT.out", "w", stdout);
}
void solveA() {
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c, n;
    cin >> a >> b >> c >> n;
    long long s = a + b + c + n;
    if (s % 3 != 0) {
      cout << "NO\n";
      continue;
    }
    s /= 3;
    if (s < a || s < b || s < c) {
      cout << "NO\n";
    } else
      cout << "YES\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  solveA();
}
