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