def 球队能否打赢(n,k,d1,d2): if n == k and (d1 != 0 or d2 != 0) or n%3 != 0: return 'no' elif (k-d1-d2)%3!=0 and (k-d1+d2)%3!=0 and (k+d1-d2)%3!=0 and (k+d1+d2)%3!=0: return 'no' elif (n == k or k==0) and d1 == 0 and d2 == 0: return 'yes' elif n > k and d1 != 0 and d2 != 0 and ((n-k-d1-d2)%2==0 or (n-k-d1-d2)% 3==0 or (n-k-d1-2*d2)%2==0 or (n-k-d1-2*d2)% 3==0 or (n-k-2*d1-d2)%2==0 or (n-k-2*d1-d2)% 3==0) and ((n-k-d1-d2)>=0 or (n-k-d1-2*d2)>=0 or (n-k-2*d1-d2)>=0): return 'yes' elif n > k and d1 != 0 and d2 == 0 and ((n-k-2*d1)%2==0 or (n-k-2*d1)%3==0) and (n-k-2*d1)>=0: return 'yes' elif n > k and d1 == 0 and d2 != 0 and ((n-k-2*d2)%2==0 or (n-k-2*d2)%3==0) and (n-k-2*d2)>=0: return 'yes' else: return 'no' if __name__ == '__main__': t = input() for i in range(int(t)): n,k,d1,d2 = map(int,input().split()) print(球队能否打赢(n,k,d1,d2))