#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int q; cin>>q; for(int i=0;i>x; int y[x]; int z=0; for(int j=0;j>y[j]; do{ z+=y[j]%10; y[j]=y[j]/10; }while(y[j]!=0); } if(z%3==0) cout<<"Yes\n"; else cout<<"No\n"; } return 0; }