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