#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n1, n2, n3, n4;
    cin >> n1 >> n2 >> n3 >> n4;
    long long res = n1 + n2 + n3 + n4;
    long long quo = res / 3;
    long long max1 = max({n1, n2, n3});
    if (res % 3 == 0) {
      if (max1 > quo)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
