There are _n_ types of coins in Byteland. Conveniently, the denomination of the coin type _k_ divides the denomination of the coin type _k_ + 1, the denomination of the coin type 1 equals 1 tugrick. The ratio of the denominations of coin types _k_ + 1 and _k_ equals _a__k_. It is known that for each _x_ there are at most **20** coin types of denomination _x_.
Byteasar has _b__k_ coins of type _k_ with him, and he needs to pay exactly _m_ tugricks. It is known that Byteasar never has more than 3·105 coins with him. Byteasar want to know how many ways there are to pay exactly _m_ tugricks. Two ways are different if there is an integer _k_ such that the amount of coins of type _k_ differs in these two ways. As all Byteland citizens, Byteasar wants to know the number of ways modulo 109 + 7.
## Input
The first line contains single integer _n_ (1 ≤ _n_ ≤ 3·105) — the number of coin types.
The second line contains _n_ - 1 integers _a_1, _a_2, ..., _a__n_ - 1 (1 ≤ _a__k_ ≤ 109) — the ratios between the coin types denominations. It is guaranteed that for each _x_ there are at most **20** coin types of denomination _x_.
The third line contains _n_ non-negative integers _b_1, _b_2, ..., _b__n_ — the number of coins of each type Byteasar has. It is guaranteed that the sum of these integers doesn't exceed 3·105.
The fourth line contains single integer _m_ (0 ≤ _m_ < 1010000) — the amount in tugricks Byteasar needs to pay.
## Output
Print single integer — the number of ways to pay exactly _m_ tugricks modulo 109 + 7.
[samples]
## Note
In the first example Byteasar has 4 coins of denomination 1, and he has to pay 2 tugricks. There is only one way.
In the second example Byteasar has 4 coins of each of two different types of denomination 1, he has to pay 2 tugricks. There are 3 ways: pay one coin of the first type and one coin of the other, pay two coins of the first type, and pay two coins of the second type.
In the third example the denominations are equal to 1, 3, 9.