#include <bits/stdc++.h>
using namespace std;
bool revp2(const pair<long long, long long>& a,
           const pair<long long, long long>& b) {
  return a.second > b.second;
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, n;
    cin >> a >> b >> c >> n;
    long long x, y;
    x = a + b + c + n;
    if (x % 3 == 0) {
      y = x / 3;
      if (y - a < 0 || y - b < 0 || y - c < 0 || (y - a + y - b + y - c) != n)
        cout << "NO\n";
      else
        cout << "YES\n";
    } else
      cout << "NO\n";
  }
}
