Team Building 2#12411

Team Building 2

2 seconds
512 megabytes
Medium

You are charged with putting together a futsal team for the city of Byteland. The team should consist of exactly players and coach.

There are people living in the city of Byteland. The -th person has playing strength equal to a_i and coaching ability equal to b_i. Your task is to select people to be players and person to be the coach to maximize the total value of the team. The value of a team is calculated as S \cdot c where is the sum of playing strengths of all players in the team and is the coaching ability of the team's coach.

One person can not be a coach and a player at the same time.

You have to answer independent test cases.

Input

The first line contains one integer (1 \le t \le 10^{5}) — the number of test cases. Then test cases follow.

The first line of the test case contains two integers (2 \le n \le 2 \cdot 10^{5}, 1 \le k < n) — the number of people and the required number of players in the team.

The second line of the test case contains integers a_1, a_2, \dots, a_n (1 \le a_i \le n) — the playing strengths of each person.

The third line of the test case contains integers b_1, b_2, \dots, b_n (1 \le b_i \le n) — the coaching abilities of each person.

It is guaranteed that the sum of over all test cases does not exceed 2 \cdot 10^5.

Output

For each test case, print one integer — the maximum possible value of a team consisting of players and coach.

Examples

Example 1

Loading
Loading

Note

In the first test case of the sample, the optimal team consists of choosing people with indices \{2,3,4\} as players and the person with index as the coach. The resulting value is (3 + 2 + 5) \cdot 5 = 50. It can be proven that it is not possible to construct a team with value larger than .

Scoring

1. Subtask ( points): (\sum n \le 2000)

2. Subtask ( points): No additional constraints