Given two arrays $a$ and $b$ of length $n$.
Please calculate:
$$ \sum_{i=1}^n \sum_{j=1}^n \min(|a_i - a_j|, |b_i - b_j|) $$
Input
The first line contains a positive integer $n$ ($1 \leq n \leq 10^5$), representing the length of the arrays.
The second line contains $n$ positive integers, representing the array $a_i$ ($1 \leq a_i \leq 10^6$).
The third line contains $n$ positive integers, representing the array $b_i$ ($1 \leq b_i \leq 10^6$).
Output
Output a single integer representing the answer.
Examples
Input 1
2 5 2 2 8
Output 1
6
Input 2
5 7 2 8 4 1 2 2 6 4 3
Output 2
34
Note
For $30\%$ of the test cases: $n \leq 1000$.
For another $20\%$ of the test cases: $a_i, b_i \leq 50$.
For another $30\%$ of the test cases: $a_i = b_i$.
For all test cases: $1 \leq n \leq 10^5, 1 \leq a_i, b_i \leq 10^6$.