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