Driver code
public static void main ( String args [ ] ) { int range [ ] [ ] = { { 1 , 2 , 3 } , { 2 , 5 , 1 } , { 3 , 10 , 1 } , { 4 , 4 , 1 } , { 5 , 7 , 10 } } ; int n = range . length ; if ( isPossible ( range , n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }