#include <iostream>
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
#define endl "\n"
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define all(x) (x).begin(), (x).end()        //for(auto it=  .begin();it!=  .end();it++)
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define T ll t=0;cin>>t;while(t--)
#define fo(i,a,b) for(i=a;i<b;i++)          
#define of(i,a,b) for(i=a;i>=b;i--)
#define itr(it,a) for(auto it= a.begin();it!= a.end();it++) 
int main() {
 
	 ios_base::sync_with_stdio(false);
     cin.tie(0);cout.tie(0);
    T
    {
        ll a[3],c=0,i,x; int ans=0;
        fo(i,0,3){cin>>a[i];c+=a[i];}
        sort(a,a+3);
        if(c%9==0)
        {
            x=c/9; if(a[0]>=x && a[1]>=x && a[2]>=x)ans=1;
        }
       
        
           
        
        if(ans==1)
        cout<<"yes"<<endl;
        else cout<<"no"<<endl;
        
        
        
        
        
    }
}