Driver Code
public static void Main ( String [ ] args ) { int [ ] arr = { 2 , 3 , 4 , 10 , 4 , 3 , 1 } ; int n = arr . Length ; if ( check ( arr , n ) == true ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }