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