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