The first line of the input contains two integers $n$ and $q$ ($1 \le n \le 2 \times 10^5$, $1 \le q \le 500$), the size of an array, and the number of queries.
The second line contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^9$), the elements of array $a$.
The third line contains $n$ integers $c_1, c_2, \dots, c_n$ ($1 \le c_i \le 10^9$), where $c_i$ is the cost of changing the $i^{th}$ element to any other value.
The last line contains $q$ integers $m_1, m_2, \dots, m_q$ ($1 \le m_i \le 10^9$), where $m_i$ is the most frequent number for the $i^{th}$ query.