#include <bits/stdc++.h>
using namespace std;
int solve() {
  int a, b, c, n;
  cin >> a >> b >> c >> n;
  int mx = max(a, max(b, c));
  long long int ans = (n - (3 * mx - a - b - c));
  if (ans < 0) return cout << "NO\n", 0;
  if (ans % 3 == 0) return cout << "YES\n", 0;
  cout << "NO\n";
  return 0;
}
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
