#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int t;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, n;
    cin >> a >> b >> c >> n;
    int d = max(a, max(b, c));
    int sum = a + b + c + n;
    if (sum % 3 == 0) {
      sum = sum / 3;
      if (sum < d)
        cout << "NO\n";
      else
        cout << "YES\n";
    } else
      cout << "NO\n";
  }
  return 0;
}
