text: Driver code
code: static void Main ( ) { int [ ] arr = { 2 , 8 , 4 , 10 , 6 , 7 } ; int n = arr . Length ; if ( hasValidNum ( arr , n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }