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