The first line contains two integers n and t, the number of stops and the largest time he may spend (2≤n≤50000, n−1≤t≤109).
The second line contains n−1 integers p1,p2,…,pn−1, where pr is the price of the travel card of range r (1≤pr≤100000).
The third line contains n−2 integers d2,d3,…,dn−1, where di is the number of minutes needed to get off and board again at stop i (1≤di≤100000). When n=2 this line is empty.