#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  int t, a, b, c, n;
  int max, sum;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a >> b >> c >> n;
    v.clear();
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(), v.end());
    max = v[2];
    sum = max - v[0] + max - v[1];
    if (n - sum < 0) {
      cout << "NO\n";
    } else {
      if ((n - sum) % 3 == 0)
        cout << "YES\n";
      else
        cout << "NO\n";
    }
  }
  return 0;
}
