#include <bits/stdc++.h>
using namespace std;
bool comp(long a, long b) { return a < b; }
int main() {
  int t;
  cin >> t;
  while (t--) {
    long a, b, c, p;
    cin >> a >> b >> c >> p;
    long mx = max({a, b, c}, comp);
    long rem = p - (mx - a) - (mx - b) - (mx - c);
    if (rem >= 0 && rem % 3 == 0) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
