N=int(input()) X=[list(map(int,input().split()))[1] for i in range(N)] if 1 in X: print('Yes') else: print('No')