#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define chmin(a,b) a=min(a,b)
#define chmax(a,b) a=max(a,b)
#define mod 1000000007
#define ad(a,b) a=(a+b)%mod;
#define X 200010
ll po(ll x,ll y){
	ll res=1;
	for(;y;y>>=1){
		if(y&1)res=res*x%mod;
		x=x*x%mod;
	}
	return res;
}
ll gcd(ll a,ll b){
	return (b?gcd(b,a%b):a);
}
ll fac[X],ivf[X];
void initfac(){
	fac[0]=1;
	for(ll i=1;i<X;i++)fac[i]=fac[i-1]*i%mod;
	for(ll i=0;i<X;i++)ivf[i]=po(fac[i],mod-2);
}
ll C(ll n,ll k){
	return fac[n]*ivf[n-k]%mod*ivf[k]%mod;
}

ll n,a[210],b[210];
vector<ll> A[210],B[210];//A[p]:=(a[i]==p)=なるiのset
bool f[210][210];
bool solve(){
	cin>>n;
	rep(i,n){
		cin>>a[i]>>b[i];
		if(a[i]>=0)a[i]--;
		if(b[i]>=0)b[i]--;
		if(a[i]!=-1&&b[i]!=-1&&a[i]>=b[i])return 0;
		if(a[i]>=0)A[a[i]].push_back(i);
		if(b[i]>=0)B[b[i]].push_back(i);
	}
	rep(i,2*n){
		if(A[i].size()+B[i].size()>1)return 0;
	}//重複なし
	for(int i=0;i<=2*n;i++)for(int j=0;j<=2*n;j++)f[i][j]=0;
	for(int l=0;l<2*n;l+=2){
		for(int k=1;l+2*k<=2*n;k++){
			int r=l+2*k;
			bool ok=1;
			rep(i,n){
				bool va=(l<=a[i]&&a[i]<r);
				bool vb=(l<=b[i]&&b[i]<r);
				if(a[i]>=0&&b[i]>=0){
					if(va==0&&vb==0)continue;
					if(va==1&&vb==1){
						ok&=(a[i]+k==b[i]);
						continue;
					}
					ok=0;
				}
				else if(a[i]==-1&&b[i]==-1)continue;
				else if(a[i]>=0){
					if(va==0)continue;
					if(not(0<=a[i]+k&&a[i]+k<2*n))ok=0;
					else if(A[a[i]+k].size()+B[a[i]+k].size()>0)ok=0;
				}
				else if(b[i]>=0){
					if(vb==0)continue;
					if(not(0<=b[i]-k&&b[i]-k<2*n))ok=0;
					else if(A[b[i]-k].size()+B[b[i]-k].size()>0)ok=0;
				}
			}
			f[l][r]=ok;
			//cerr<<"f["<<l<<"]["<<r<<"]="<<f[l][r]<<endl;
		}
	}
	bool dp[210];
	for(int i=0;i<=2*n;i++)dp[i]=0;
	dp[0]=1;
	for(int i=0;i<2*n;i++){
		if(dp[i]==0)continue;
		for(int j=i+1;j<=2*n;j++){
			if(f[i][j]==1){
				dp[j]=1;
			}
		}
	}
	return dp[2*n];
}
int main(){
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout<<(solve()?"Yes":"No")<<endl;
	
}

#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007ll
#define rep(i, n) for(int i = 0; i < n; i++)
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;


int main() {
    int n; cin >> n;
    vector<pair<string, int>> s(n);
    for (int i=0; i<n; i++) {
        cin >> s[i].first;
        if (s[i].first[0] == '!') {
            s[i].first.erase(0, 1);
            s[i].second = 1;
        } else {
            s[i].second = 0;
        }
    }
    sort(s.begin(), s.end());

    for (int i=0; i<n-1; i++) {
        if (s[i].first == s[i+1].first && s[i].second != s[i+1].second) {
            cout << s[i].first << endl;
            return 0;
        }
    }

    cout << "satisfiable" << endl;
    return 0;
}