#include #include #define nmax 10001 #define f cin using namespace std; //ifstream f("date.in"); long long int n,v[nmax]; void rezolvare() { bool da=true; f>>n; int s=0; for (int i=1;i<=n;i++) { f>>v[i]; while (v[i]!=0) { s=s+v[i]%10; v[i]=v[i]/10; } } if (s%3==0) { cout<<"Yes\n"; } else cout<<"No\n"; } void citire() { int t=0; f>>t; for (int i=1;i<=t;i++) { rezolvare(); } } void rez() { } int main() { citire(); rez(); return 0; }