#include <bits/stdc++.h>
using namespace std;
const int dx[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1};
const int dy[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
void AIA() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long tin(string s) {
  long long re = 0;
  for (int i = 0; i < s.size(); i++) {
    re *= 10;
    re += int(s[i] - '0');
  }
  return re;
}
int main() {
  AIA();
  int t;
  cin >> t;
  for (int T = 1; T <= t; T++) {
    long long a[3], n, m = 0;
    cin >> a[0] >> a[1] >> a[2] >> n;
    sort(a, a + 3);
    m += a[2] - a[1];
    m += a[2] - a[0];
    n -= m;
    if (n % 3 || n < 0) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
  }
  return 0;
}
