N = int(input()) flag = False for _ in range(N): v,w = map(int,input().split()) if w == 1: flag = True break if flag: print('Yes') else: print('No')