#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int w = 0; w < t; w++) {
    int a, b, c, n;
    cin >> a >> b >> c >> n;
    if ((a + b + c + n) % 3 == 0) {
      int t = (a + b + c + n) / 3;
      if (t < a or t < b or t < c)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
