#include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
#define irep(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
using ll = long long;
using namespace std;

ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }
//sort(a, a + N, greater<ll>())   // descend
//sort(a, a+N)                    //  ascend

/* 
void comb(vector<vector <ll> > &v) {
	ll mod=1000000007;
	rep (i,0,v.size()) {
		v[i][0] = 1;
		v[i][i] = 1;
	}
	rep (k,1,v.size()) {
		rep (j,1,k) {
			v[k][j] = (v[k - 1][j - 1] + v[k - 1][j])%mod;
		}
	}
}
/*main内でnCn~nC0 生成 **
vector<vector<ll> > v(n + 1, vector<ll>(n + 1, 0));
comb(v);
*/

int main() {
	bool p =false;
	ll n;
	cin>>n;
	ll a[110000];
	rep(i,0,n)cin>>a[i];
	ll ans=0;
	rep(i,0,n) ans=(ans+a[i]%)3;
	rep(i,0,n) if((ans+a[i])%3==0) {p=true; break;}
	if(p)cout<<"Yes";
	else cout<<"No";


}
















/* 
int main() {
	ll n,c,k;
	cin>>n>>c>>k;
	ll t[110000];
	rep(i,0,n)cin>>t[i];
	sort(t,t+n);
	ll time = t[0];
	ll cnt =0;
	rep(i,0,n){
		if(t[i]>time)  {cnt=i-1; break;}
	}*/

