Driver Code
public static void main ( String [ ] args ) { int N = 2 , M = 3 ; int A [ ] = { 1 , 2 } ; int B [ ] = { 1 , 2 , 3 } ; int K = 1 ; System . out . print ( numberOfWays ( A , B , N , M , K ) ) ; } }