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 PYTHON3):

Solution:
from sys import stdin
from math import *
from sys import *
from heapq import *
from collections import defaultdict
from itertools import permutations
import os, sys
from io import IOBase, BytesIO
M=10**9+7
 
def graph_as_tree_1_root():
    n=int(input())
    dict=defaultdict(list)
    for _ in range(n-1):
        x,y=list(map(int,input().split()))
        dict[x].append(y)
        dict[y].append(x)
    tree=[[1]]
    temp=[1]
    vall=0
    seen=set([i for i in range(2,n+1)])
    lol=[]
    while len(seen)>0:
        #print(seen)
        lol=list(seen)
        tt=[]
        for x in temp:
            aa=[]
            for val in dict[x]:
                if val in seen:
                    aa+=[val]
                    seen.remove(val)
            dict[x]=aa
            tt+=aa
        tree.append(tt)
        temp=tt
        vall+=1
    for x in lol:
        dict[x]=[]
    
    print(tree,dict)
def pow(a,b):
    res=1
    while b>0:
        if b&1:
            res*=a
        a*=a
        b>>=1
    return res
def powmod(a,b,m):
    res=1
    while b>0:
        if b&1:
            res=((res*a)%m)
        a=(a*a)%m
        b//=2
    return res
def inv(a,m):
    return powmod(a,m-2,m)
def alldivisors(n) : 
    list = []  
    arr=[]
    for i in range(1, int(sqrt(n) + 1)) :
        if (n % i == 0) : 
            if (n / i == i) : 
                arr+=[i]
            else :
                arr+=[i]
                list.append(n//i)  
    arr+=list[::-1]
    return arr
def primefactorisation(n):
    potentional_p = 3
    itog_list = defaultdict(int)
    if n % 2 == 0:
        itog_list[2] = 0
    while n % 2 == 0:
        n = n // 2
        itog_list[2] += 1
    while n - 1:
        if potentional_p > (n**0.5):
            itog_list[n] += 1
            return itog_list
        while n % potentional_p == 0:
            n = n // potentional_p
            itog_list[potentional_p] += 1
        potentional_p += 2
    return itog_list
 
# stdin = open('input.txt','r')
 
def main():
    I = stdin.readline()
    t = int(I)
    while t!=0:
        # print(t)
        t = t-1
        I = stdin.readline()
        a,b,c,n = list(map(int, I.split()))
        each = a+b+c+n
        if each%3!=0:
            print("No")
            continue
        else:
            each = each/3;
            if a>each or b>each or c>each:
                print("No")
                continue
            else:
                print("Yes")
    # n,k=list(map(int,input().split()))
    # a=list(map(int,input().split()))
    # arr=[]
    # for x in a:
    #     arr.append((primefactorisation(x)))
    # #print(arr)
    # res=0
    # for i in range(n-1): 
    #     for j in range(i+1,n):
    #         temp=arr[i].copy()
    #         #print(i,j)
    #         #print(temp)
    #         #print(arr[j])
    #         for x in arr[j]:
    #             temp[x]+=arr[j][x]
    #         if temp=={}:
    #             res+=1
    #             #print(i,j)
    #             continue
    #         lst=list(temp.values())
    #         fl=0
    #         for x in lst:
    #             if x%k!=0:
    #                 fl=1
    #                 break
    #         if fl==0:
    #             res+=1
    #             #print(i,j)
    # print(res)
            
            
 
            
 
 
 
 
 
 
 
 
BUFSIZE = 8192
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO,self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill(); self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s:self.buffer.write(s.encode('ascii'))
        self.read = lambda:self.buffer.read().decode('ascii')
        self.readline = lambda:self.buffer.readline().decode('ascii')
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
 
if __name__ == '__main__':
    main()
#threading.Thread(target=main).start()