N=int(input()) A=set() for i in range(N): x,y=map(int,input().split()) w=x*10**10+y if w in A: print('Yes') exit() A.add(w) print('No')