#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a[3], n;
  cin >> a[0] >> a[1] >> a[2] >> n;
  sort(a, a + 3);
  n -= a[2] - a[0] + a[2] - a[1];
  cout << (n >= 0 && n % 3 == 0 ? "YES\n" : "NO\n");
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) solve();
}
