#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c, n;
    cin >> a >> b >> c >> n;
    if ((a + b + c + n) % 3 == 0) {
      long long x = (a + b + c + n) / 3;
      long long A = abs(x - a);
      long long B = abs(x - b);
      long long C = abs(x - c);
      if (A + a == B + b && B + b == C + c) {
        cout << "YES" << endl;
      } else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
