There are N towns in a coordinate plane. Town i is located at coordinate (xi,yi). The distance between town i and town j is |xi−xj|+|yi−yj|. Your task is to compute the sum of the distance between each pair of towns.
Input format
Output format
For each test case, print the sum of the distance between each pair of towns in a new line.
Constraints
1≤T≤10001≤N≤2000000≤xi,yi≤1000000000
It is guaranteed that the sum of N over T test cases does not exceed 1e6.
For the first testcase, there are no possible pairs of town. Therefore, the sum is 0.
For the second testcase, there are only 3 possible pairs (town1,town2), (town1,town3) and (town2,town3). Therefore, the sum of distance between every pair of towns is 12.