#include using namespace std; int main() { long long int t,i,j,k,l,n,temp; cin >> t; for(int i= 0; i < t; i++) { temp=0; cin>>n; long long int A[n]; for(j=0;j>A[j]; } for(j=0;j0) { temp=A[j]%10+temp; A[j]=A[j]/10; } } if(temp%3==0) { cout<<"Yes"<