#include <bits/stdc++.h>
using namespace std;
void solve() {
  int k;
  vector<int> v(3);
  for (auto& i : v) cin >> i;
  cin >> k;
  sort(v.begin(), v.end());
  int diff = (2 * v[2]) - (v[1] + v[0]);
  cout << (((k - diff) >= 0) and ((k - diff) % 3) == 0 ? "YES" : "NO") << endl;
}
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
