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