#!/bin/python3 import sys n = int(input().strip()) xs=set() ys=set() for a0 in range(n): x,y = input().strip().split(' ') xs.add(x) ys.add(y) if len(xs)==1 or len(ys)==1: print("YES") else: print("NO")