#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a[3], n;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a[0] >> a[1] >> a[2] >> n;
    sort(a, a + 3);
    int d = 2 * a[2] - a[1] - a[0];
    if (d > n) {
      cout << "NO" << endl;
    } else {
      if ((n - d) % 3 == 0) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
}
