#include using namespace std; #define pb push_back #define mpa make_pair #define timesaver ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); const unsigned int mod=1e7+7; #define PI 3.14159265 typedef long long int ll; const long long int N=1e5; map mp; //ll lazy[400009],segtree[400009],y=0,n,sum[200009],bal[2009],x,p,q,m; bool visit[1000]={false},vis[10009]={false}; vector v[1000]; string s[1000],si; int main() { ll l,ans=0,n,m,cnt,k=0,t=0,z=0,w=0,pre=1e5,mid,a[500009]={0},h[29]={0},t1,t2,now,r=0,i=0,j=0,flag=0,temp=0,e=-1e4,o=0; cin>>t; while(t--) { ans=0; cin>>n; for(i=0;i>l; while(l!=0) { z=l%10; ans=ans+z; l=l/10; } } if(ans%3==0) cout<<"Yes"<