#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a, b, c, n, A, B;
  cin >> t;
  int arr[3];
  while (t--) {
    cin >> a >> b >> c >> n;
    arr[0] = a;
    arr[1] = b;
    arr[2] = c;
    sort(arr, arr + 3);
    bool z = false;
    if ((a == b) && (b == c) && n % 3 == 0) {
      z = true;
    }
    A = (arr[2] - arr[0]);
    B = (arr[2] - arr[1]);
    if (n >= (A + B)) {
      n = n - (A + B);
      if (n % 3 == 0) {
        z = true;
      }
    }
    if (z) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
