Aarav has just graduated from the university. Now he is going to travel along his country. More precisely: there are N cities with integer coordinates. His plan is to travel between each pair of the cities. 

The distance between city A with coordinates (x1, y1) and city B with coordinates (x2, y2) is equal to |x1 - x2| + |y1 - y2|.

Now he is interested in the total distance between all the pairs of the cities.

Input
The first line contains one integer N.
The following N lines contain two separated integers (xi, yi) each - coordinates of the corresponding city.

Output
Output one integer - the answer to the question. 
As this number can be very big - output it modulo 10^9 + 7.

Constraints
1 ≤ N ≤ 200 000
|xi|, |yi| ≤ 10^9

SAMPLE INPUT
4
-1 5
1 6
3 5
2 3

SAMPLE OUTPUT
22
from collections import defaultdict
mod_const = (10**9+7)

def compute_distances(X, Y, N):
    X.sort()
    Y.sort()
    
    def total_pairwise_length(X):
        ret = 0
        for i in xrange(N/2):
            x_span = abs(X[-1-i] - X[i]) % mod_const
            ret += x_span * (N-(2*i)-1)
            ret %= mod_const
        return ret
    
    ret = 0
    ret += total_pairwise_length(X)
    ret += total_pairwise_length(Y)
    return (ret % mod_const)

N = input()
X = [0] * N
Y = [0] * N

for i in xrange(N):
    X[i], Y[i] = map(int, raw_input().split())


print compute_distances(X, Y, N)