#include #include #include #include #include using namespace std; int main() { int t; cin>>t; while(t--){ int n; cin>>n; int i; long a[n]; long temp=0; for(i=0;i>a[i]; a[i] %= 3; temp += a[i]; temp %= 3; } if(temp == 0) cout<<"Yes"<