#ifndef INCLUDED_MAIN #define INCLUDED_MAIN #include __FILE__ int main(void) { ll n; cin>>n; vector ss; rep(i,n) { string s,t; cin>>s>>t; ss.pb(s); ss.pb(t); } rep(i,n) { ll ban1=i*2,ban2=i*2+1; bool b1=false,b2=false; rep(j,2*n) { if(j==ban1 || j==ban2) continue; if(ss[ban1]==ss[j]) b1=true; if(ss[ban2]==ss[j]) b2=true; } if(b1&&b2) { no(); return 0; } } yes(); } /////// library zone /////// #else #include using namespace std; #define rep(i,n) for(ll i=0;i=l;i--) using ll = long long; using ld = long double; const ll mod=998244353; #define vout(v) for(auto i :v) cout< #define vc vector #define pb push_back bool isin(ll i,ll j,ll h,ll w) { return (0<=i && i2e18) { return 2e18; } return p*q*q*q; } ll op(ll a,ll b) {return max(a,b);} ll e() {return -Winf; } vector Erasieve(ll n) { vector is_prime(n+1, true); is_prime[0] = is_prime[1] = false; for (int i=2;i*i<=n;++i) { if (is_prime[i]) { for (int j=i*i;j<=n;j+=i) is_prime[j] = false; } } vector primes; srep(i,2,n) { if (is_prime[i]) primes.push_back(i); } return primes; } template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} void no() { cout<<"No"<0) { if (po&1) ret=(ret*fl)%mod; fl=(fl*fl)%mod; po>>=1; } } else { while (po>0) { if(po&1) ret*=fl; fl*=fl; po>>=1; } } return ret; } #endif