#include <bits/stdc++.h>
using namespace std;
long long _set(long long N, long long pos) { return N = N | (1 << pos); }
long long _reset(long long N, long long pos) { return N = N & ~(1 << pos); }
bool _check(long long N, long long pos) { return (bool)(N & (1 << pos)); }
bool _upper(char a) { return a >= 'A' && a <= 'Z'; }
bool _lower(char a) { return a >= 'a' && a <= 'z'; }
bool _digit(char a) { return a >= '0' && a <= '9'; }
long long dx[] = {1, -1, 0, 0, -1, -1, 1, 1};
long long dy[] = {0, 0, 1, -1, -1, 1, -1, 1};
int main() {
  long long T;
  cin >> T;
  while (T--) {
    long long a, b, c, n;
    cin >> a >> b >> c >> n;
    long long S = a + b + c + n;
    if (S % 3) {
      cout << "NO\n";
      continue;
    }
    S /= 3;
    if (S < a || S < b || S < c)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
  return 0;
}
