#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

bool check(VI a, VI b){
    int n = a.size();
    int m = 7;
    REP(i,n) cout << a[i] << b[i] << endl;
    VVI dp(1<<n, VI(m));
    REP(i,n){
        dp[1<<i][b[i]] = 1;
        dp[1<<i][a[i]] = 1;
    }
    FOR(i,1,(1<<n)-1) REP(j,m){
        if (dp[i][j] == 0) continue;
        REP(k,n){
            if ((i >> k) & 1) continue;
            if (a[k] == j) dp[i | (1<<k)][b[k]] = 1;
            if (b[k] == j) dp[i | (1<<k)][a[k]] = 1;
        }
    }
    REP(j,m){
        if (dp[(1<<n)-1][j] == 1) return true;
    }
    return false;
}

int main(){
    int n;
    while (scanf("%d", &n)){
        VI a(n), b(n);
        REP(i,n){
            string x;
            cin >> x;
            a[i] = x[0] - '0';
            b[i] = x[1] - '0';
        }

        cout << (check(a, b) ? "Yes" : "No") << endl;
    }


    return 0;
}