#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int n, m, idx, current;
pair<int, int> p[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  while (n--) {
    int a, b, c, m;
    cin >> a >> b >> c >> m;
    if ((a + b + c + m) % 3 == 0 && (a + b + c + m) / 3 >= max(a, max(b, c))) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
}
