#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  long A[3], n, i, x, y, z;
  cin >> t;
  while (t--) {
    for (i = 0; i < 3; i++) cin >> A[i];
    cin >> n;
    sort(A, A + 3);
    x = A[2] - A[0];
    y = A[2] - A[1];
    z = n - x - y;
    if (z % 3 == 0 && z >= 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
