Driver code
public static void main ( String [ ] args ) { int n = 3 , x = 4 ; int [ ] a = { 2 , 4 , 2 } ; if ( canVote ( a , n , x ) ) { System . out . println ( " YES " ) ; } else { System . out . println ( " NO " ) ; } } }