#include #define long long int ll using namespace std; int tc,i,j,k,n,x; int fun(int p) { int sum=0; while(p) { sum =p%10; p=p/10; } return sum; } int main () { cin >>tc; while(tc--) { cin >>n; int ans=0; while(n--) { cin >>x; ans=ans+fun(x); } if(x%3==0) cout <<"Yes"<