#include <bits/stdc++.h>
using namespace std;

int main()
{
    int N, count = 0;
    char a = '!';
    cin >> N;
    vector<string> s(N);
    set<string> z;
    for (int i = 0; i < N; i++)
    {
        cin >> s.at(i);
        z.insert(s.at(i));
    }

    for (auto value : z)
    {
        if (z.count(value) && z.count(a+value))
        {
            cout << value << endl;
            return 0;
        }
        
    }
    
    cout << "satisfiable" << endl;

    return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;
using LL = long long;
using P = pair<int,int>;

int main(){
	string S;
	cin >> S;
	int s_siz = S.size();
	vector<int> num(10);
	rep(i,s_siz){
		int n = S[i] - '0';
		num[n]++;
	}
	for(int i=8; i<1000; i+=8){
		string t = to_string(i);
		int t_siz = t.size();
		rep(j,min(s_siz,3)-t_siz) t = '0' + t;
		map<char,int> mp;
		rep(j,t_siz) mp[t[j]]++;
		bool flag = true;
		for(auto itr : mp){
			int n = itr.first - '0';
			if(itr.second > num[n]){
				flag = false;
				break;
			}
		}
		if(flag){
			cout << "Yes" << endl;
			return 0;
		}
	}
	cout << "No" << endl;

	return 0;
}