import java.util.Scanner; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author iiitk101 */ class points { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); int x[] = new int[t]; int y[] = new int[t]; String result = "YES"; int flagX = 0, flagY = 0; for (int i = 0; i < t; i++) { x[i] = sc.nextInt(); y[i] = sc.nextInt(); if (x[i] == 0) { flagX = 1; } } if (flagX == 1) { for (int j = 1; j < t; j++) { if (x[j] != 0) { result = "NO"; } } } else if (flagY == 1) { for (int j = 1; j < t; j++) { if (y[j] != 0) { result = "NO"; } } } System.out.println(result); } }