SW Skill Test

Pick and order problems within T minutes, each solved back to back, to maximize the sum of M_i - (start minute) * P_i.

Medium6Dynamic programmingSortingGreedyNo attempts yetTime limit2sMemory limit512 MB

Problem

The SW skill test runs for TT minutes and has NN problems. You may submit source code at any moment while the test is running.

Solving problem ii at minute tt earns Mit×PiM_i - t \times P_i points. Solving problem ii takes the contestant RiR_i minutes.

The contestant works on one problem at a time and never pauses a problem once started. The contestant freely chooses which problems to solve and in what order, and may skip any problem. If the test starts at minute 0, the solved problems run back to back, and the moment the last one is solved cannot exceed minute TT.

The final score is the sum of the points of the solved problems, and it is 0 when no problem is solved. Write a program that finds the largest score the contestant can get.

Input

The first line contains NN and TT. (1N501 \le N \le 50, 1T1000001 \le T \le 100\,000)

The second line contains M1,M2,,MNM_1, M_2, \ldots, M_N, the third line contains P1,P2,,PNP_1, P_2, \ldots, P_N, and the fourth line contains R1,R2,,RNR_1, R_2, \ldots, R_N, each separated by spaces. (1Mi,Pi,Ri1000001 \le M_i, P_i, R_i \le 100\,000)

Output

Print the largest score the contestant can get on the first line.