from collections import defaultdict N = int(input()) ST = [list(input().split()) for _ in range(N)] D = defaultdict(int) for S, T in ST: D[S] += 1 D[T] += 1 for S, T in ST: D[S] -= 1 D[T] -= 1 if 1 <= min(D[S], D[T]): print("No") break D[S] += 1 D[T] += 1 else: print("Yes")