#SDNU1486. Problem_D

Problem_D

Description

SDNU Acmers use coins.They have coins of value A1,A2,A3...AnA_1,A_2,A_3...A_n silver dollar.
One day Fat ChaoChao opened purse and found there were some coins. He decided to buy a very cooooooool gift in a shop and send it to a girl. He wanted to pay the exact price(without change) and he known the price would not more than m.But he didn't know the exact price of the gift.
You are to write a program which reads n,m,A1,A2,A3...Ann,m,A_1,A_2,A_3...An and C1,C2,C3...CnC_1,C_2,C_3...C_n corresponding to the number of coins of value A1,A2,A3...AnA_1,A_2,A_3...A_n then calculate how many prices(form 1 to mm) Tony can pay use these coins.

Format

Input

The input contains several test cases.
The first line of each test case contains two integers (1n100),m(m100000)(1 \leq n \leq 100),m(m \leq 100000).
The second line contains 2n2n integers, denoting $A_1,A_2,A_3...A_n,C_1,C_2,C_3...C-n (1 \leq A_i \leq 100000,1 \leq C_i \leq 1000)$.
The last test case is followed by two zeros.

Output

For each test case output the answer on a single line.

Samples

3 10
1 2 4 2 1 1
2 5
1 4 2 1
0 0
8
4