def main(): N = int(input()) for _ in range(N): v, w = map(int, input().split()) if w == 1: print("Yes") break else: print("No") if __name__ == "__main__": main()