#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
  int a, b, c, cnt;
  int t;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c >> cnt;
    int ave = (a + b + c + cnt) / 3;
    if (ave < a || ave < b || ave < c)
      cout << "NO\n";
    else if (ave * 3 != (a + b + c + cnt))
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
