Snuke is playing with red and blue balls, placing them on a two-dimensional plane.
First, he performed $N$ operations to place red balls. In the $i$\-th of these operations, he placed $RC_i$ red balls at coordinates $(RX_i,RY_i)$. Then, he performed another $N$ operations to place blue balls. In the $i$\-th of these operations, he placed $BC_i$ blue balls at coordinates $(BX_i,BY_i)$. The total number of red balls placed and the total number of blue balls placed are equal, that is, $\sum_{i=1}^{N} RC_i = \sum_{i=1}^{N} BC_i$. Let this value be $S$.
Snuke will now form $S$ pairs of red and blue balls so that every ball belongs to exactly one pair. Let us define the _score_ of a pair of a red ball at coordinates $(rx, ry)$ and a blue ball at coordinates $(bx, by)$ as $|rx-bx| + |ry-by|$.
Snuke wants to maximize the sum of the scores of the pairs. Help him by finding the maximum possible sum of the scores of the pairs.
## Constraints
* $1 \leq N \leq 1000$
* $0 \leq RX_i,RY_i,BX_i,BY_i \leq 10^9$
* $1 \leq RC_i,BC_i \leq 10$
* $\sum_{i=1}^{N} RC_i = \sum_{i=1}^{N} BC_i$
* All values in input are integers.
## Input
Input is given from Standard Input in the following format:
$N$
$RX_1$ $RY_1$ $RC_1$
$RX_2$ $RY_2$ $RC_2$
$\vdots$
$RX_N$ $RY_N$ $RC_N$
$BX_1$ $BY_1$ $BC_1$
$BX_2$ $BY_2$ $BC_2$
$\vdots$
$BX_N$ $BY_N$ $BC_N$
[samples]