#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    long long a, b, c, n;
    scanf("%lld%lld%lld%lld", &a, &b, &c, &n);
    long long sum = a + b + c + n, temp = sum / 3;
    if (sum % 3 != 0 || a > temp || b > temp || c > temp) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
  }
  return 0;
}
