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