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