N=int(input()) S=set() for i in range(N): a,b=map(int,input().split()) if a*10000+b in S: print("Yes") exit() S.add(a*10000+b) print("No")