import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static Scanner sc = new Scanner(System.in); static int i(){ return sc.nextInt(); } static int[][] ia(int n){ //integer array urf ia() int arr[][] = new int[n][2]; for(int i=0;i0){ int n = i(); int a[][] = ia(n); if(n<=3) System.out.println("YES"); else { int f = 0; for(int j=3;j