for _ in range(int(input())): if input().split()[1] == '1': exit(print("Yes")) print("No")