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