n = int(input()) ok = False for _ in range(n): v, w = map(int, input().split()) if w == 1: ok = True if ok: print("Yes") else: print("No")