#include <bits/stdc++.h>
using namespace std;
void solve() {
  int arr[3];
  int n;
  for (int i = 0; i < 3; i++) cin >> arr[i];
  cin >> n;
  sort(arr, arr + 3);
  int d = 2 * arr[2] - arr[1] - arr[0];
  if (d > n) {
    cout << "NO" << '\n';
  } else {
    n -= d;
    if (n % 3 == 0) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
}
int main() {
  srand(unsigned(time(0)));
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
