Driver code
int main ( ) { int n = 3 , m = 4 ; int arr [ ] = { 6 , 3 , 2 , 1 } ; int p = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; if ( isPossible ( arr , p , n , m ) ) cout << " Yes " ; else cout << " No " ; return 0 ; }