Problem: Polycarp has three sisters: Alice, Barbara, and Cerene. They're collecting coins. Currently, Alice has a coins, Barbara has b coins and Cerene has c coins. Recently Polycarp has returned from the trip around the world and brought n coins.

He wants to distribute all these n coins between his sisters in such a way that the number of coins Alice has is equal to the number of coins Barbara has and is equal to the number of coins Cerene has. In other words, if Polycarp gives A coins to Alice, B coins to Barbara and C coins to Cerene (A+B+C=n), then a + A = b + B = c + C.

Note that A, B or C (the number of coins Polycarp gives to Alice, Barbara and Cerene correspondingly) can be 0.

Your task is to find out if it is possible to distribute all n coins between sisters in a way described above.

You have to answer t independent test cases.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 10^4) — the number of test cases.

The next t lines describe test cases. Each test case is given on a new line and consists of four space-separated integers a, b, c and n (1 ≤ a, b, c, n ≤ 10^8) — the number of coins Alice has, the number of coins Barbara has, the number of coins Cerene has and the number of coins Polycarp has.

Output

For each test case, print "YES" if Polycarp can distribute all n coins between his sisters and "NO" otherwise.

Example

Input


5
5 3 2 8
100 101 102 105
3 2 1 100000000
10 20 15 14
101 101 101 3


Output


YES
YES
NO
NO
YES

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void getar(T a, int n, int m) {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; ++j) {
      scanf("%d", &a[i][j]);
    }
}
inline void getar(int *a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("%d", a + ii);
  }
}
inline void getar(pair<int, int> *a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("d", &a[ii].first, &a[ii].second);
  }
}
inline void getar(long long *a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("%I64d", a + ii);
  }
}
inline void getv(vector<int> &a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("%d", &a[ii]);
  }
}
inline void getv(vector<long long> &a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("%I64d", &a[ii]);
  }
}
inline void getv(vector<pair<int, int> > &a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("%d", &a[ii].first, &a[ii].second);
  }
}
inline void getv(vector<pair<long long, long long> > &a, int n) {
  for (int ii = 0; ii < n; ii++) {
    scanf("%I64d", &a[ii].first, &a[ii].second);
  }
}
inline void getvv(vector<vector<int> > &a, int n, int m) {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; ++j) {
      scanf("%d", &a[i][j]);
    }
}
inline void printa(int *a, int i, int j) {
  for (int ii = i; ii <= j; ii++) {
    printf("%d ", a[ii]);
  }
}
inline void printa(long long *a, int i, int j) {
  for (int ii = i; ii <= j; ii++) {
    printf("%I64d ", a[ii]);
  }
}
inline void printv(vector<int> &a, int i, int j) {
  for (int ii = i; ii <= j; ii++) {
    printf("%d ", a[ii]);
  }
}
inline void printv(vector<long long> &a, int n, int i, int j) {
  for (int ii = i; ii <= j; ii++) {
    printf("%I64d ", a[ii]);
  }
}
inline long long max(long long a, long long b) { return (a > b) ? a : b; }
inline int max(int a, int b) { return (a > b) ? a : b; }
inline double max(double a, double b) { return (a > b) ? a : b; }
inline long long max(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
inline int max(int a, int b, int c) { return max(a, max(b, c)); }
inline double max(double a, double b, double c) { return max(a, max(b, c)); }
inline long long min(long long a, long long b) { return (a < b) ? a : b; }
inline int min(int a, int b) { return (a < b) ? a : b; }
inline double min(double a, double b) { return (a < b) ? a : b; }
inline long long min(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
inline int min(int a, int b, int c) { return min(a, min(b, c)); }
inline double min(double a, double b, double c) { return min(a, min(b, c)); }
inline long long pow(long long x, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res *= x;
    x *= x;
    n >>= 1;
  }
  return res;
}
inline long long powmod(long long x, long long n, long long _mod) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * x) % _mod;
    x = (x * x) % _mod;
    n >>= 1;
  }
  return res;
}
inline long long gcd(long long a, long long b) {
  long long t;
  while (b) {
    a = a % b;
    t = a;
    a = b;
    b = t;
  }
  return a;
}
inline int gcd(int a, int b) {
  int t;
  while (b) {
    a = a % b;
    t = a;
    a = b;
    b = t;
  }
  return a;
}
inline long long lcm(int a, int b) { return a / gcd(a, b) * (long long)b; }
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long gcd(long long a, long long b, long long c) {
  return gcd(gcd(a, b), c);
}
inline int gcd(int a, int b, int c) { return gcd(gcd(a, b), c); }
inline long long lcm(long long a, long long b, long long c) {
  return lcm(lcm(a, b), c);
}
inline long long lcm(int a, int b, int c) {
  return lcm(lcm(a, b), (long long)c);
}
inline int bits_count(int v) {
  v = v - ((v >> 1) & 0x55555555);
  v = (v & 0x33333333) + ((v >> 2) & 0x33333333);
  return ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
inline int bits_count(long long v) {
  long long t = v >> 32;
  long long p = (v & ((1LL << 32) - 1));
  return bits_count(t) + bits_count(p);
}
inline bool ispow2(int x) { return (x != 0 && (x & (x - 1)) == 0); }
const char nl = '\n';
void solve() {
  int a, b, c, n;
  cin >> a >> b >> c >> n;
  if ((n - (2 * a - b - c)) % 3 == 0 && n >= 2 * a - b - c) {
    int A = (n - (2 * a - b - c)) / 3;
    if (a + A - b >= 0 && a + A - c >= 0)
      cout << "YES\n";
    else
      cout << "NO\n";
  } else
    cout << "NO\n";
}
int main() {
  clock_t clk = clock();
  cerr << "Hey P..\n";
  int t;
  cin >> t;
  while (t--) solve();
  cerr << "Look at the sky.\n";
  cerr << "Time (in ms): " << (double)(clock() - clk) * 1000.0 / CLOCKS_PER_SEC
       << '\n';
  return 0;
}