The first line contains two integers N and M, the number of challenges and the money Dudu starts with.
The second line contains N integers A1,A2,…,AN, where Ai is the cost of attempting challenge i.
The third line contains N integers B1,B2,…,BN, where Bi is the payoff for completing challenge i.
- 1≤N≤1000
- 0≤M,Ai,Bi≤106