#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c, n, p, p1, p2, p3, p4, p5, p0;
    cin >> a >> b >> c >> n;
    p0 = max(a, b);
    p = max(p0, c);
    p1 = abs(p - a);
    p2 = abs(p - b);
    p3 = abs(p - c);
    p4 = p1 + p2 + p3;
    p5 = n - p4;
    if (p5 < 0)
      cout << "NO" << endl;
    else {
      if (p5 % 3 == 0)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
  return 0;
}
