n = int(input()) ok = False for _ in range(n): v, w = map(int, input().split()) if w == 1: ok = True print('Yes' if ok else 'No')