There are multiple test cases. The first line of input contains an integer $T$, indicating the number of test cases. For each test case:
The first line has two integers $n$ and $k$ ($1\leq n \leq 10^5, 1\leq k \leq 5$).
The second line has $k$ non-negative integers (initial magic attributes) $v_1, v_2, v_3, \dots, v_k$.
For the next $n$ lines, the $i$-th line contains $2k$ non-negative integers $a_{i,1}, a_{i,2}, a_{i,3}, \dots, a_{i, k}, b_{i,1}, b_{i,2}, b_{i,3}, \dots, b_{i, k}$.
It's guaranteed that all input integers are no more than $10^9$ and $v_j + \displaystyle\sum_{i=1}^n b_{i,j} \leq 10^9$ for $j = 1, 2, 3, \dots, k$.
It is guaranteed that the sum of all n $\leq 5 \times 10 ^ 5$.
The input data is very large so fast IO (like `fread`) is recommended.