#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, sum = 0;
    double n;
    cin >> a >> b >> c >> n;
    sum += a + b + c + n;
    if ((sum / 3.0) == floor(sum / 3.0)) {
      if (sum / 3 >= a && sum / 3 >= b && sum / 3 >= c)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
