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