#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, n;
    cin >> a >> b >> c >> n;
    long long p = n + b + c - 2 * a;
    long long q = n + c + a - 2 * b;
    long long r = n + a + b - 2 * c;
    if (p >= 0 && q >= 0 && r >= 0 && p % 3 == 0 && q % 3 == 0 && r % 3 == 0) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}
