#!/bin/python import sys n = int(raw_input().strip()) allpoints = list() x_set = set() y_set = set() for a0 in xrange(n): x,y = raw_input().strip().split(' ') x,y = [int(x),int(y)] x_set.add(x) y_set.add(y) if (len(x_set) == 1) or (len(y_set) == 1): print 'YES' else: print 'NO'