#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 m = max(a, max(b, c));
    int x = abs(m - b) + abs(m - c) + abs(m - a);
    if (x > n) {
      cout << "NO" << endl;
    } else {
      if ((x - n) % 3 == 0) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}
