#include <bits/stdc++.h>
using namespace std;
void DHMM() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  DHMM();
  int a, b, c, n, t;
  vector<int> v(3);
  cin >> t;
  while (t--) {
    for (int i = 0; i < 3; i++) cin >> v[i];
    cin >> n;
    sort(v.rbegin(), v.rend());
    a = v[0] - v[1];
    b = v[0] - v[2];
    n = n - (a + b);
    if (n % 3 == 0 && n >= 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
