import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int q=sc.nextInt(); for(int i=0;ia[j][0]) minx=a[j][0]; if(maxxa[j][1]) miny=a[j][1]; if(maxy=miny && a[j][1]<=maxy) || ((a[j][1]==miny || a[j][1]==maxy) && a[j][0]>=minx && a[j][0]<=maxx)) continue; else break; } if(j==n) System.out.println("YES"); else System.out.println("NO"); } } }