#include int main() { long long int t,n,i,d,s; scanf("%lld",&t); while(t--) { s=0; scanf("%lld",&n); long long int a[n]; for(i=0;i0) { d=a[i]%10; s=s+d; a[i]=a[i]/10; } } } if(s%3==0) printf("Yes\n"); else printf("No\n"); } }