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