Turkish Roulette is a betting game played on a wheel with $S$ slots, each labeled with an integer between $-64$ and $64$. In every turn the players bet on $B$ balls, each also numbered from $-64$ to $64$, and every ball is bet on by exactly one player.
After the wheel is spun, the dealer drops the $B$ balls in one at a time. When the wheel stops, each ball comes to rest over two adjacent slots, as shown in the figure below (a wheel with thirty-two slots and four balls). Because each ball spans two adjacent slots, the wheel holds at most $\lfloor S/2 \rfloor$ balls.

The balls keep the same relative order in which they were dropped. That is, if balls $a$, $b$, and $c$ are dropped in that order, then, reading clockwise, $a$ is followed by $b$, $b$ by $c$, and $c$ back around to $a$.
The value of a ball is its own number multiplied by the sum of the numbers of the two slots it rests over. If this value is positive, the dealer pays that amount to the player who bet on the ball; if it is negative, that player pays its absolute value to the dealer. The dealer's profit for the turn is the total amount received minus the total amount paid.
For example, in the figure above the dealer pays $5.00 for the ball numbered $-1$, pays $7.00 for the ball numbered $-7$, receives $24.00 for the ball numbered $12$, and neither pays nor receives anything for the ball numbered $3$. The dealer's profit in this turn is therefore $12.00 ($24 - 5 - 7$); note that the profit may be negative (a loss).
Given the wheel, the balls, and the order in which the balls are dropped, determine the maximum profit the dealer can make in a single turn.
The input contains several test cases. The first line of each test case contains two integers $S$ and $B$: the number of slots on the wheel ($3 \le S \le 250$) and the number of balls used ($1 \le B \le \lfloor S/2 \rfloor$). The second line contains $S$ integers $X_i$, the numbers on the slots given clockwise ($-64 \le X_i \le 64$ for $1 \le i \le S$). The third line contains $B$ integers $Y_i$, the numbers on the balls ($-64 \le Y_i \le 64$ for $1 \le i \le B$), listed in the order the balls are dropped, which is also their clockwise order once they come to rest. The input ends with a line containing $S = B = 0$, which is not processed.
For each test case, print a single line containing one integer: the maximum profit the dealer can make in that turn.