Drive code
public static void Main ( ) { int [ ] arr = { 1 , 2 , 3 , 1 , 2 } ; int n = arr . Length ; if ( can_form_palindrome ( arr , n ) ) Console . Write ( " YES " ) ; else Console . Write ( " NO " ) ; } }