Driver Code
public static void Main ( ) { int [ ] arr = { 6 , 2 , 2 , 2 } ; int N = arr . Length ; if ( CheckAllarrayEqual ( arr , N ) ) { Console . Write ( " YES " ) ; } else { Console . Write ( " NO " ) ; } } }