#include<cstdio>

#define	rep(i,n)	for(int i=0;i<n;i++)

using namespace std;

int main(){
	for(int n;~scanf("%d",&n);){
		int deg[7]={},node;
		bool wf[7][7]={};
		rep(u,7)	wf[u][u]=true;
		rep(i,n){
			int domi;	scanf("%d",&domi);
			int u=domi/10,v=domi%10;
			deg[u]++,deg[v]++;
			wf[u][v]=wf[v][u]=true;
			node=u;
		}

		rep(k,7)rep(i,7)rep(j,7)	wf[i][j]|=wf[i][k]&wf[k][j];
		bool ok=true;
		rep(u,7) if(deg[u]>0 && !wf[node][u]) ok=false;
		if(!ok){ puts("No"); continue; }

		int cnt=0;
		rep(u,7)if(deg[u]%2==1) cnt++;
		puts(cnt<=2?"Yes":"No");
	}

	return 0;
}