#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a[3], n;
  cin >> a[0] >> a[1] >> a[2] >> n;
  long long ans = n + a[0] + a[1] + a[2] - 3 * max(a[0], max(a[1], a[2]));
  if (ans < 0) {
    cout << "NO"
         << "\n";
  } else if (ans % 3 == 0) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long test;
  test = 1;
  cin >> test;
  while (test--) {
    solve();
  }
  return 0;
}
