N = int(input())

inputs = [input().split(" ") for _ in range(N)]    


for input in inputs:
    print(input)
    A = int(input[0])
    B = int(input[1])
    C = int(input[2])
    D = int(input[3])
    asa = A

    if (A - 3*B + 2*D) == C:
        print("Yes")
    else:
        print("No")