n = int(input()) f = 0 for i in range(n): v, w = map(int, input().split()) if w == 1: f = 1 print("Yes" if f else "No")