#include <bits/stdc++.h>
using namespace std;
int array1[4];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int TestCase;
  cin >> TestCase;
  while (TestCase--) {
    cin >> array1[0] >> array1[1] >> array1[2] >> array1[3];
    int Tong = (array1[0] + array1[1] + array1[2] + array1[3]) / 3;
    if (Tong * 3 == array1[0] + array1[1] + array1[2] + array1[3] &&
        Tong >= array1[0] && Tong >= array1[1] && Tong >= array1[2]) {
      cout << "YES"
           << "\n";
    } else {
      cout << "NO"
           << "\n";
    }
  }
  return 0;
}
