#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int a[3], n, max = 0;
    scanf("%d %d %d %d", &a[0], &a[1], &a[2], &n);
    for (int y = 0; y < 3; y++) {
      if (a[y] > max) max = a[y];
    }
    if ((n - 3 * max + a[0] + a[1] + a[2]) >= 0 &&
        (n - 3 * max + a[0] + a[1] + a[2]) % 3 == 0)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
