//Perfection is not attainable,but if we chase perfection we can catch excellence. #include using namespace std; typedef long long int ll; #define DHOKHA ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) int main(){ DHOKHA; ll t; cin>>t; while(t--){ ll n; cin>>n; ll i; ll sum=0; for(i=0;i<=n-1;i++){ string s; cin>>s; for(ll j=0;j<=s.length()-1;j++){ sum+=(s[j]-48); } } if(sum%3==0){ cout<<"Yes\n"; }else{ cout<<"No\n"; } } }