Driver code
public static void main ( String [ ] args ) { int k = 8 ; int arr [ ] = { 1 , 2 , 3 , 4 } ; int n = arr . length ; if ( isPossible ( n , k , arr ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }