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