#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a(3);
  int t, n;
  cin >> t;
  for (int m = 0; m < t; m++) {
    cin >> a[0] >> a[1] >> a[2] >> n;
    sort(a.begin(), a.end());
    if ((a[2] - a[0] + a[2] - a[1] <= n) &&
        ((n - (a[2] - a[0] + a[2] - a[1])) % 3 == 0))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
