#include <bits/stdc++.h>
int main() {
  int t;
  int a, b, c, n;
  int f = 1;
  int h;
  scanf("%d", &t);
  while (t--) {
    f = 1;
    scanf("%d %d %d %d", &a, &b, &c, &n);
    if ((a + b + c + n) % 3 != 0)
      f = 0;
    else {
      h = (a + b + c + n) / 3;
      if (a > h || b > h || c > h) f = 0;
    }
    if (f == 1)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
