#include <bits/stdc++.h>
using namespace std;
void max(int *x, int *y, int *z) {
  int max, m1, m2;
  *x > *y ? (max = *x, m2 = *y) : (max = *y, m2 = *x);
  max > *z ? m1 = *z : (m1 = max, max = *z);
  if (m2 > m1) {
    m2 = m1 + m2;
    m1 = m2 - m1;
    m2 = m2 - m1;
  }
  *x = max;
  *y = m1;
  *z = m2;
}
int main() {
  int t, a, b, c, n;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a >> b >> c >> n;
    max(&a, &b, &c);
    while (c != a) {
      c++;
      n--;
    }
    while (b != a) {
      b++;
      n--;
    }
    if (n % 3 == 0 && n >= 0)
      cout << "\n YES";
    else
      cout << "\n NO";
  }
  return 0;
}
