Driver code
var A = [ 1 , 1 , 1 , 1 , 1 ] ; var B = [ 2 , 2 ] ; var n = A . length ; var m = B . length ; ; var x = 3 , y = 1 ; if ( isPossible ( A , B , n , m , x , y ) ) document . write ( " " ) ; else document . write ( " " ) ;