from collections import defaultdict N = int(input()) d = defaultdict(set) for _ in range(N): s, t = map(int, input().split()) d[s].add(t) ans = "Yes" for key in d: if len(d[key])>1: ans = "No" print(ans)