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