#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Mod=998244353;

void solve() {
   int a,b,c;
   cin >> a >> b >> c;
   int k=b-a;
   c-=k;
   if(c>=b && (c-b)%3==0){
    cout << "YES\n";
    return;
   } 
   cout << "NO\n";
}

int main(){ 
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
	
    int t;
    cin >> t;
    while (t--) solve();
    

    return 0;
}
