#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, e;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> e;
    int m = max(a, max(b, c));
    int l = (m - a) + (m - b) + (m - c);
    if (l > e) {
      cout << "NO" << endl;
      continue;
    } else if (l == e) {
      cout << "YES" << endl;
      continue;
    }
    e -= l;
    if (e % 3 == 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
