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