#include<bits/stdc++.h>
#define ll long long int
#define fab(a,b,i) for(int i=a;i<b;i++)
#define db double
#define endl "\n"
#define f first
#define se second
#define MOD 1000000007
#define quick ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
ll add(ll x, ll y) {ll res = x + y; return (res >= MOD ? res - MOD : res);}
ll mul(ll x, ll y) {ll res = x * y; return (res >= MOD ? res % MOD : res);}
ll sub(ll x, ll y) {ll res = x - y; return (res < 0 ? res + MOD : res);}
ll power(ll x, ll y) {ll res = 1; x %= MOD; while (y) {if (y & 1)res = mul(res, x); y >>= 1; x = mul(x, x);} return res;}
ll mod_inv(ll x) {return power(x, MOD - 2);}

using namespace std;
ll a[10000000],b[10000000];
int main()
{ 
	quick;
#ifndef ONLINE_JUDGE
    freopen("C:/coding/input.txt", "r", stdin);
    freopen("C:/coding/output.txt", "w", stdout);
#endif
	
		ll n,sum=0;
		string s;
		cin>>n;
		for(int i=0;i<n;i++)
		cin>>a[i];
		for(int i=0;i<n;i++)
			cin>>b[i];
		for(int i=0;i<n;i++)
		{
			sum+=(a[i]*b[i]);
		}
		if(sum==0)
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;
	

 cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define fo(i,a,n) for(i=a;i<n;i++)
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define sortrev(x) sort(all(x),greater<int>())
#define pi 3.1415926535897932384626
 
typedef pair<int,int> pii;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<ll>  vl;
typedef vector<pii> vpii;
typedef vector<pl>  vpl;
typedef vector<vi>  vvi;
typedef vector<vl>  vvl;
typedef vector<double> vd;
 
const int mod = 1000000007;
const int inf = 1000000000;
const int N = 2000007, M = N;
ll i,j,cnt,par,ans;
  
void solve() {	
	ll n;
	
	cin>>n;
	string s;
	
	bool f = 0;
	
	map<string,int>mp1,mp2;
	for(int i=0;i<n;i++) {
		cin>>s;
		if(f) continue;
		if(s[0] == '!') {
			s = s.substr(1);
			if(mp1[s]) {
				cout<<s<<"\n";
				f = 1;
			}
			mp2[s]++;
		} else {
			if(mp2[s]) {
				cout<<s<<"\n";
				f = 1;
			}
			mp1[s]++;
		}
	}
	if(!f) cout<<"satisfiable\n";
}
 
int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
 
    int t = 1;
    //cin >> t;
    while(t--) {
    	solve();
	}
 
    return 0;
}