import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int q = in.nextInt(); for(int i=0;ix[j]) { minX = x[j]; } y[j] = in.nextInt(); if(maxYy[j]) { minY = y[j]; } } Map map = new HashMap(); if(n<=2) { System.out.println("YES"); } else { map.put(maxX, 1); map.put(maxY, 1); map.put(minX, 1); map.put(minY, 1); boolean flag = false; for(int j=0;j