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