N = int(input()) dic = {} S = [] T = [] for i in range(N): s,t = input().split() if s not in dic: dic[s] = 0 dic[s] += 1 if t not in dic: dic[t] = 0 dic[t] += 1 S.append(s) T.append(t) ans = "Yes" for s,t in zip(S,T): if dic[s] == 1 or dic[t] == 1: pass else: ans = "No" break print (ans)