from collections import defaultdict import sys input = sys.stdin.readline N = int(input()) ST = [input().split() for _ in range(N)] S = defaultdict(int) for s, t in ST: S[s] += 1 S[t] += 1 flag = True for s, t in ST: if S[s]==1 or S[t]==1: continue flag = False break if flag: print("Yes") else: print("No")