Driver Code
static void Main ( ) { List < List < int > > arr = new List < List < int > > ( ) ; arr . Add ( new List < int > { 1 , 4 } ) ; arr . Add ( new List < int > { 2 , 2 } ) ; arr . Add ( new List < int > { 2 , 3 } ) ; int n = arr . Count ; if ( checkNonOverlapping ( arr , n ) ) { Console . WriteLine ( " YES " ) ; } else { Console . WriteLine ( " NO " ) ; } } }