#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define p_b pop_back
using namespace std;

int main(){
    int n, sum = 0;
    cin >> n;

    vector<int> v1, v2;
    for(int i = 0; i < n; i++){
        int k;
        cin >> k;
        v1.pb(k);
    }
    for(int i = 0; i < n; i++){
        int k;
        cin >> k;
        v2.pb(k);
    }

    for(int i = 0; i < n; i++){
        sum += v1[i]*v2[i];
    }

    if(sum == 0){
        cout << "Yes\n";
    } else{
        cout << "No\n";
    }
    return 0;
}
//
//  main.cpp
//  rferf
//
//  Created by Harshita Hazarika on 28/12/20.
//  Copyright © 2020 Harshita Hazarika. All rights reserved.
//

#include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <iterator>
#include <map>
#include<climits>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <unordered_map>
#include<cmath>
#include <unordered_set>

using namespace std;
typedef long long int ll;

ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;
    if (x == 0) return 0;
    while (y > 0){
        if (y & 1)  res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}

ll modInverse(ll n, ll p)
{
    return power(n, p-2, p);
}

void solve()
{
    ll n;
    cin>>n;
    string str="";
    set<string>st;
    bool flag=false;
    for(ll i=0;i<n;i++){
        string s;
        cin>>s;
        if(!flag){
        if(s[0]=='!'){
            if(st.find(s.substr(1))!=st.end()){
                str=s.substr(1);
                flag=true;
            }
        }
        else{
           if(st.find("!"+s)!=st.end()){
                str=s;
               flag=true;
            }
        }
        st.insert(s);
    }
        
    }
    if(flag){
        cout<<str<<"\n";
    }
    else{
        cout<<"satisfiable\n";
    }
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
//    int t;
//    cin >> t;
//    while(t--)
      solve();

    return 0;
}
