n = int(input()) ans = "No" for _ in range(n): if input().startswith("1 "): ans = "Yes" print(ans)