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