You are given an integer array $$$[a_1, a_2, \ldots, a_n]$$$. Initially, all the elements are unlocked.
You may perform the following operation on array $$$a$$$ any number of times (possibly zero):
The total cost is equal to the sum of the individual costs over all the operations performed.
Determine the minimum possible total cost to make all the elements of the array $$$a$$$ equal. Furthermore, among all the ways to achieve this minimum possible total cost, find the minimum number of operations required.
The first line of the input contains a single integer $$$t$$$ ($$$1 \le t \le 2 \cdot 10^4$$$) — the number of test cases. The description of each test case follows.
The first line of each test case contains a single integer $$$n$$$ ($$$2 \le n \le 2 \cdot 10^5$$$) — the length of the array $$$a$$$.
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$-10^9 \le a_i \le 10^9$$$) — the elements of the array $$$a$$$.
It is guaranteed that the sum of $$$n$$$ over all the test cases does not exceed $$$2 \cdot 10^5$$$.
For each test case, print two space-separated integers on a new line — the minimum possible total cost to make all the elements equal, and the minimum number of operations required to make all the elements equal with the minimum possible total cost.
531 2 32-1 -1418 -2 9 1199 9 8 2 4 4 3 5 336 67 7
2 20 022 2019 761 61
In the first test case, the following sequence of operations is optimal:
The total cost is $$$1+1=2$$$, and exactly $$$2$$$ operations are performed. It is impossible to make all elements equal with a smaller total cost.
In the second test case, all elements are already equal, so the minimum total cost and the minimum number of operations are both $$$0$$$.