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 ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }