#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 1e5 + 555;
const int MOD = 1e9 + 7;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int cas;
  cin >> cas;
  while (cas--) {
    static auto gao = [&]() -> bool {
      int a, b, c, n;
      cin >> a >> b >> c >> n;
      int ave = a + b + c + n;
      if (ave % 3) {
        return false;
      } else {
        ave /= 3;
        return ave >= max({a, b, c});
      }
    };
    cout << (gao() ? "YES" : "NO") << endl;
  }
  return 0;
}
