/* -*- coding: utf-8 -*- * * 3196.cc: No.3196 Unique Nickname - yukicoder */ #include #include #include #include using namespace std; /* constant */ const int MAX_N = 100; /* typedef */ using msi = map; /* global variables */ string ss[MAX_N], ts[MAX_N]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); msi scs; for (int i = 0; i < n; i++) { char s[32], t[32]; scanf("%s%s", s, t); string si(s), ti(t); ss[i] = si, ts[i] = ti; scs[si]++, scs[ti]++; } for (int i = 0; i < n; i++) if (scs[ss[i]] > 1 && scs[ts[i]] > 1) { puts("No"); return 0; } puts("Yes"); return 0; }