You just found a cave filled with $N$ treasures (numbered from $1$ to $N$). Treasure $i$ has a weight of $W_i$ and a value of $V_i$.
Luckily, you also bring $M$ horse carts (numbered from $1$ to $M$) to help you carry the treasures. Each cart can only carry one treasure; cart $j$ can only carry a treasure with weight at most $S_j$.
Determine the maximum total value of treasures that you can take using your horse carts.
The first line consists of two integers $N$ $M$ ($1 ≤ N, M ≤ 100\, 000$).
Each of the next $N$ lines consists of two integers $W_i$ $V_i$ ($1 ≤ W_i , V_i ≤ 10^6$).
The following line consists of $M$ integers $S_j$ ($1 ≤ S_j ≤ 10^6$).
Output a single integer representing the maximum total value of treasures that you can take using your horse carts.