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