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