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