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