You are given an array of non-negative integers a_1, a_2, \ldots, a_n. You are allowed to perform at most operations. Each operation consists of two steps:
Let g = \gcd(a_1, \ldots, a_n).
Choose an index j~(1 \le j \le n) and set a_j \leftarrow a_j + g.
Find the maximum possible element of the array after performing at most operations.
The first line contains one positive integer t~(1 \le t \le 10) — the number of test cases.
Each test case is described by two lines:
The first line contains two integers and k~(1 \le n \le 100, 0 \le k \le 3) — the length of the array and the number of allowed operations.
The second line contains integers a_i~(0 \le a_i \le 1000) — the elements of the array .
For each test case, output one number — the maximum element of the array that can be obtained by applying the described operation at most times.
Example 32
Subtask ( points): k = 0
Subtask ( points): k = 1
Subtask ( points): No additional constraints.