You are given an array a of length 2n. Consider a partition of array a into two subsequences p and q of length n each (each element of array a should be in exactly one subsequence: either in p or in q).

Let's sort p in non-decreasing order, and q in non-increasing order, we can denote the sorted versions by x and y, respectively. Then the cost of a partition is defined as f(p, q) = ∑_{i = 1}^n |x_i - y_i|.

Find the sum of f(p, q) over all correct partitions of array a. Since the answer might be too big, print its remainder modulo 998244353.

Input

The first line contains a single integer n (1 ≤ n ≤ 150 000).

The second line contains 2n integers a_1, a_2, …, a_{2n} (1 ≤ a_i ≤ 10^9) — elements of array a.

Output

Print one integer — the answer to the problem, modulo 998244353.

Examples

Input


1
1 4


Output


6

Input


2
2 1 2 1


Output


12

Input


3
2 2 2 2 2 2


Output


0

Input


5
13 8 35 94 9284 34 54 69 123 846


Output


2588544

Note

Two partitions of an array are considered different if the sets of indices of elements included in the subsequence p are different.

In the first example, there are two correct partitions of the array a:

  1. p = [1], q = [4], then x = [1], y = [4], f(p, q) = |1 - 4| = 3; 
  2. p = [4], q = [1], then x = [4], y = [1], f(p, q) = |4 - 1| = 3. 



In the second example, there are six valid partitions of the array a: 

  1. p = [2, 1], q = [2, 1] (elements with indices 1 and 2 in the original array are selected in the subsequence p); 
  2. p = [2, 2], q = [1, 1]; 
  3. p = [2, 1], q = [1, 2] (elements with indices 1 and 4 are selected in the subsequence p); 
  4. p = [1, 2], q = [2, 1]; 
  5. p = [1, 1], q = [2, 2]; 
  6. p = [2, 1], q = [2, 1] (elements with indices 3 and 4 are selected in the subsequence p).

Difficulty: HARD

Solutions:
def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
n = int(input())
a = sorted(list(map(int, input().split())))
ans = 0
for i in range(n):
	ans += abs(a[i] - a[2 * n - 1 - i])
fac = ncr(2 * n, n, 998244353)
print(fac * ans % 998244353)


n = int(input())
mod = 998244353
(*arr,) = map(int, input().split())
arr.sort()
i = 0
j = 2 * n - 1
s = 0
while i < j:
	s += abs(arr[i] - arr[j])
	i += 1
	j -= 1
s %= mod
factorials = [1]
for i in range(1, 2 * n + 1):
	factorials.append(factorials[-1] * i % mod)
inverses = [pow(v, mod - 2, mod) for v in factorials]

def cnk(n, k):
	return factorials[n] * inverses[k] * inverses[n - k] % mod
print(s * cnk(2 * n, n) % mod)


def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
n = int(input())
a = sorted(list(map(int, input().split())))
m = 998244353
ans = sum(a[n:]) - sum(a[:n])
ans = ans % m
ans = ans * ncr(2 * n, n, m) % m
print(ans)


n = int(input())
l = list(map(int, input().split()))
l.sort()
l1 = l[:n]
l2 = l[n:]
l2.sort(reverse=True)
ans = 0
for i in range(n):
	ans += abs(l1[i] - l2[i])
f = [1] * 300001
fi = [1] * 300001
a = 1
b = 1
m = 998244353
for i in range(2, 2 * n + 1):
	a *= i
	a %= m
	b *= pow(i, m - 2, m)
	b %= m
	f[i] = a
	fi[i] = b
print(ans * f[2 * n] * fi[n] * fi[n] % m)


mod = 998244353

class Combi:

	def __init__(self, N, mod):
		self.power = [1 for _ in range(N + 1)]
		self.rev = [1 for _ in range(N + 1)]
		self.mod = mod
		for i in range(2, N + 1):
			self.power[i] = self.power[i - 1] * i % self.mod
		self.rev[N] = pow(self.power[N], self.mod - 2, self.mod)
		for j in range(N, 0, -1):
			self.rev[j - 1] = self.rev[j] * j % self.mod

	def com(self, K, R):
		if K < R:
			return 0
		else:
			return self.power[K] * self.rev[K - R] * self.rev[R] % self.mod

	def pom(self, K, R):
		if K < R:
			return 0
		else:
			return self.power[K] * self.rev[K - R] % self.mod

def main():
	n = int(input())
	c = Combi(3 * 10 ** 5 + 10, mod)
	a = list(map(int, input().split()))
	a.sort()
	ans = c.com(2 * n, n) * (sum(a) - 2 * sum(a[:n])) % mod
	print(ans)
	return
main()


import os
import sys
from io import BytesIO, IOBase
import heapq as h
from bisect import bisect_left, bisect_right
from types import GeneratorType
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			self.os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import defaultdict as dd, deque as dq
import math, string

def getInts():
	return [int(s) for s in input().split()]

def getInt():
	return int(input())

def getStrs():
	return [s for s in input().split()]

def getStr():
	return input()

def listStr():
	return list(input())
MOD = 998244353

def solve():
	N = getInt()
	A = getInts()
	A.sort()
	ans = 0
	for j in range(N):
		ans -= A[j]
	for j in range(N, 2 * N):
		ans += A[j]
	ans %= MOD
	curr = 1
	for j in range(1, 2 * N + 1):
		curr *= j
		curr %= MOD
		if j == N:
			n_fac = curr
		if j == 2 * N:
			tn_fac = curr
	div = pow(n_fac, MOD - 2, MOD)
	return ans * tn_fac * div * div % MOD
print(solve())


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush, heappop
import math
from collections import *
from functools import reduce, cmp_to_key, lru_cache
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip().split()]

def st():
	return str(input().rstrip())[2:-1]

def val():
	return int(input().rstrip())

def li2():
	return [str(i)[2:-1] for i in input().rstrip().split()]

def li3():
	return [int(i) for i in st()]
M = mod = 998244353
N = 3 * 10 ** 5
facts = [1]
for i in range(1, N + 10):
	facts.append(facts[-1] * i % mod)

def ncr(n, r):
	return facts[n] * inv_mod(facts[n - r]) * inv_mod(facts[r]) % mod
n = val()
l = sorted(li())
su1 = sum(l[n:])
su2 = sum(l[:n])
ans = su1 - su2
print(ans * ncr(2 * n, n) % mod)


from bisect import *
from collections import *
from random import *
from decimal import *
from itertools import *
from heapq import *
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def st():
	return input().rstrip('\n')

def lis():
	return list(map(int, input().split()))

def ma():
	return map(int, input().split())
t = 1
p = 998244353
fac = [1]
for i in range(1, 300010):
	fac.append(fac[-1] * i % p)
while t:
	t -= 1
	n = inp()
	a = lis()
	a.sort()
	ha = fac[2 * n]
	ha = ha * pow(fac[n], p - 2, p) * pow(fac[n], p - 2, p)
	ha = ha % p
	(nn, pp) = (0, 0)
	for i in range(2 * n):
		if i < n:
			nn += ha * a[i]
			nn = nn % p
		else:
			pp += ha * a[i]
			pp = pp % p
	print((pp - nn) % p)


def ncrmod(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % mod
		den = den * (i + 1) % mod
	return num * pow(den, mod - 2, mod) % mod
n = int(input())
a = list(map(int, input().split()))
mod = 998244353
a = sorted(a)
l1 = a[:n]
l2 = a[n:]
diff = sum([abs(l1[i] - l2[i]) for i in range(n)])
out = ncrmod(2 * n, n) * (diff % mod) % mod
print(out)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if not True else 1):
	n = int(input())
	a = list(map(int, input().split()))
	a = sorted(a)
	x = a[:n]
	y = a[n:][::-1]
	val = 0
	for i in range(n):
		val += abs(x[i] - y[i])
	mod = 998244353
	max_n = 400000
	if 1:
		max_n = min(max_n, mod - 1)
		(fact, inv_fact) = ([0] * (max_n + 1), [0] * (max_n + 1))
		fact[0] = 1
		for i in range(max_n):
			fact[i + 1] = fact[i] * (i + 1) % mod
		inv_fact[-1] = pow(fact[-1], mod - 2, mod)
		for i in reversed(range(max_n)):
			inv_fact[i] = inv_fact[i + 1] * (i + 1) % mod

		def nCr_mod(n, r):
			res = 1
			while n or r:
				(a, b) = (n % mod, r % mod)
				if a < b:
					return 0
				res = res * fact[a] % mod * inv_fact[b] % mod * inv_fact[a - b] % mod
				n //= mod
				r //= mod
			return res
	print(val * nCr_mod(2 * n, n) % mod)


import sys
from math import *
from fractions import *

def main():

	def modst(a, s):
		ret = 1
		while s:
			if s % 2:
				ret = ret * a % mod
			a = a * a % mod
			s //= 2
		return ret

	def C_n_k(n, k):
		return fact[n] * modst(fact[n - k] * fact[k] % mod, mod - 2) % mod
	n = int(sys.stdin.readline().strip())
	q = sorted(list(map(int, sys.stdin.readline().split())))
	mod = 998244353
	fact = [1 for i in range(600009)]
	for i in range(2, 2 * n + 7):
		fact[i] = i * fact[i - 1] % mod
	print((sum(q[n:]) - sum(q[:n])) % mod * C_n_k(2 * n, n) % mod)
main()


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max
N = 300005
factorialNumInverse = [None] * (N + 1)
naturalNumInverse = [None] * (N + 1)
fact = [None] * (N + 1)

def InverseofNumber(p):
	naturalNumInverse[0] = naturalNumInverse[1] = 1
	for i in range(2, N + 1, 1):
		naturalNumInverse[i] = naturalNumInverse[p % i] * (p - int(p / i)) % p

def InverseofFactorial(p):
	factorialNumInverse[0] = factorialNumInverse[1] = 1
	for i in range(2, N + 1, 1):
		factorialNumInverse[i] = naturalNumInverse[i] * factorialNumInverse[i - 1] % p

def factorial(p):
	fact[0] = 1
	for i in range(1, N + 1):
		fact[i] = fact[i - 1] * i % p

def Binomial(N, R, p):
	ans = fact[N] * factorialNumInverse[R] % p * factorialNumInverse[N - R] % p
	return ans

def main():
	mod = 998244353
	InverseofNumber(mod)
	InverseofFactorial(mod)
	factorial(mod)
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = 1
	for _ in range(tc):
		n = ri()
		a = ria()
		a = sorted(a)
		s1 = sum(a[:n])
		s2 = sum(a[n:])
		ans = (s2 - s1) * Binomial(2 * n, n, mod)
		print(ans % mod)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


m = 998244353

def modExp(a, n, m=10 ** 9 + 7):
	if n == 0:
		return 1
	elif n == 1:
		return a
	else:
		while n >= 2:
			if n % 2 == 0:
				n = n // 2
				return modExp(a % m * (a % m) % m, n, m)
			else:
				n = (n - 1) // 2
				return a % m * modExp(a % m * (a % m) % m, n, m) % m % m
dic = {0: 1}
for i in range(1, 300001):
	dic[i] = dic[i - 1] * i % m

def nCr(n, r):
	return dic[n] * modExp(dic[r] * dic[n - r] % m, m - 2, m) % m
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
i = 0
out = 0
while i < n:
	out += abs(arr[i] - arr[n + i])
	i += 1
print(out * nCr(2 * n, n) % m)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]

def YES():
	print('YES')

def NO():
	print('NO')

def Yes():
	print('Yes')

def No():
	print('No')
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24
N = 300005
mod = 998244353
fac = [1, 1]
finv = [1, 1]
inv = [0, 1]
for i in range(2, N + 1):
	fac.append(fac[-1] * i % mod)
	inv.append(mod - inv[mod % i] * (mod // i) % mod)
	finv.append(finv[-1] * inv[-1] % mod)

def comb(n, r):
	if n < r:
		return 0
	else:
		return fac[n] * (finv[r] * finv[n - r] % mod) % mod

def solve():
	n = int(inp())
	mod = 998244353
	ar = lis()
	ar.sort()
	s1 = sum(ar)
	s2 = sum(ar[:n])
	t = s1 - 2 * s2
	t %= mod
	t *= comb(2 * n, n)
	t %= mod
	print(t)
solve()


def pwm(a, n, mod):
	ans = 1
	while n:
		if n & 1:
			ans = ans * a % mod
		a = a * a % mod
		n >>= 1
	return ans
n = int(input())
l = [int(x) for x in input().split()]
l.sort()
(a, b) = (l[:n], l[n:])
ans = 0
mod = 998244353
dnom = 1
nom = 1
for i in range(n):
	ans += (b[i] % mod - a[i] % mod) % mod
	nom = nom * (i + 1) % mod * (2 * n - i) % mod
	dnom = dnom * (i + 1) % mod * (i + 1) % mod
gg = nom % mod * pwm(dnom, mod - 2, mod) % mod
fans = ans * gg % mod
print(fans)


from sys import stdin
from math import floor
k = int(input())
n = 2 * k
arr = [int(x) for x in stdin.readline().split()]
arr = sorted(arr)
primes = []
degrees = []
degrees1 = []
numbers = [True] * (n + 1)
numbers[0] = False
numbers[1] = False
for i in range(2, n + 1):
	if numbers[i] == True:
		primes.append(i)
		k = i
		while i * k <= n:
			numbers[i * k] = False
			k = k + 1
for p in primes:
	s = 0
	j = 1
	while p ** j <= n:
		s = s + n // p ** j
		j = j + 1
	degrees.append(s)
k = n // 2
for p in primes:
	s = 0
	j = 1
	while p ** j <= k:
		s = s + k // p ** j
		j = j + 1
	degrees1.append(s)
ans = 1
for j in range(len(degrees)):
	degrees[j] = degrees[j] - 2 * degrees1[j]
	for i in range(degrees[j]):
		ans = ans * primes[j] % 998244353
st = sum(arr[:k]) % 998244353
en = sum(arr[k:]) % 998244353
su = (en - st) * ans % 998244353
print(su)


import sys
input = sys.stdin.buffer.readline
(n, ar) = (int(input()), list(map(int, input().split())))
ar.sort()
(p1, p2, MOD) = (1, 1, 998244353)
for u in range(1, 2 * n + 1):
	if u <= n:
		p1 = p1 * u % MOD
	else:
		p2 = p2 * u % MOD
m = p2 * pow(p1, MOD - 2, MOD) % MOD
(cc, t) = (0, m)
for u in range(1, 2 * n):
	cc = (cc + (ar[u] - ar[u - 1]) * t) % MOD
	if u < n:
		t += m
	else:
		t -= m
print(cc)


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()

def FACT(n, mod):
	s = 1
	facts = [1]
	for i in range(1, n + 1):
		s *= i
		s %= mod
		facts.append(s)
	return facts[n]

def C(n, k, mod):
	return FACT(n, mod) * pow(FACT(k, mod) * FACT(n - k, mod) % mod, mod - 2, mod) % mod
n = II()
a = LI()
x = sorted(a[:n])
y = sorted(a[n:])[:][::-1]
s = 0
mod = 998244353
for i in range(n):
	s += abs(x[i] - y[i])
print(s * C(2 * n, n, mod) % mod)


n = int(input())
a = sorted(map(int, input().split()))
tot = sum(a[n:]) - sum(a[:n])
MOD = 998244353
fact = [1]
for i in range(1, 2 * n + 1):
	fact.append(fact[-1] * i % MOD)
tot *= fact[2 * n]
inv = pow(fact[n], MOD - 3, MOD)
tot *= inv
print(tot % MOD)


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
mod = 998244353
n = inp()
a = inara()
a.sort()
ans = 0
for i in range(n):
	ans -= a[i]
for i in range(n, 2 * n):
	ans += a[i]
ans %= mod
fact = [1] * (2 * n + 1)
for i in range(1, 2 * n + 1):
	fact[i] = fact[i - 1] * i
	fact[i] %= mod
C = fact[2 * n] * pow(fact[n], mod - 2, mod) ** 2
C %= mod
ans *= C
ans %= mod
print(ans)


from bisect import *
from collections import *
from math import gcd, ceil, sqrt, floor, inf
from heapq import *
from itertools import *
from operator import add, mul, sub, xor, truediv, floordiv
from functools import *
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def RL():
	return map(int, sys.stdin.readline().rstrip().split())

def RLL():
	return list(map(int, sys.stdin.readline().rstrip().split()))

def N():
	return int(input())
farr = [1]
ifa = []

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa = ifa[::-1]

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def linc(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t > f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rinc(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t < f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def ldec(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t < f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rdec(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t > f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def isprime(n):
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def binfun(x):
	c = 0
	for w in arr:
		c += ceil(w / x)
	return c

def lowbit(n):
	return n & -n

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class smt:

	def __init__(self, l, r, arr):
		self.l = l
		self.r = r
		self.value = (1 << 31) - 1 if l < r else arr[l]
		mid = (l + r) // 2
		if l < r:
			self.left = smt(l, mid, arr)
			self.right = smt(mid + 1, r, arr)
			self.value &= self.left.value & self.right.value

	def setvalue(self, x, val):
		if self.l == self.r:
			self.value = val
			return
		mid = (self.l + self.r) // 2
		if x <= mid:
			self.left.setvalue(x, val)
		else:
			self.right.setvalue(x, val)
		self.value = self.left.value & self.right.value

	def ask(self, l, r):
		if l <= self.l and r >= self.r:
			return self.value
		val = (1 << 31) - 1
		mid = (self.l + self.r) // 2
		if l <= mid:
			val &= self.left.ask(l, r)
		if r > mid:
			val &= self.right.ask(l, r)
		return val

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] < self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

	def __init__(self, n):
		self.parent = [i for i in range(n)]
		self.ranks = [0] * n

	def find(self, x):
		if x != self.parent[x]:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return prime

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		for v in graph[u]:
			if v not in d or d[v] > d[u] + graph[u][v]:
				d[v] = d[u] + graph[u][v]
				heappush(heap, (d[v], v))
	return d

def GP(it):
	res = []
	for (ch, g) in groupby(it):
		res.append((ch, len(list(g))))
	return res
t = 1
mod = 998244353
for i in range(t):
	n = N()
	a = RLL()
	fact(2 * n, mod)
	ifact(2 * n, mod)
	a.sort()
	con = com(2 * n, n, mod)
	ans = 0
	for i in range(2 * n):
		if i < n:
			ans -= con * a[i]
		else:
			ans += con * a[i]
		ans %= mod
	print(ans)


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()
MOD = 998244353

def main():
	n = int(inputi())
	aa = [int(a) for a in inputi().split()]
	aa.sort()
	sm = sum(aa[n:]) - sum(aa[:n]) % MOD
	fac = [1]
	for i in range(1, n * 2 + 1):
		fac.append(fac[-1] * i % MOD)
	fni = pow(fac[n], MOD - 2, MOD)
	res = sm * fac[n * 2] * fni * fni % MOD
	print(res)
main()


def big_mod(a, b):
	if b == 0:
		return 1
	x = big_mod(a, int(b / 2))
	if b & 1:
		return x * x % MOD * a % MOD
	else:
		return x * x % MOD
n = int(input())
a = list(map(int, input().split()))
a.sort()
(x, y) = (a[:n], a[n:])
y.reverse()
sum = 0
for i in range(n):
	sum += abs(x[i] - y[i])
MOD = 998244353
fact = [1, 1]
for i in range(2, 2 * n + 1):
	fact.append(fact[i - 1] * i % MOD)
val = fact[n] * fact[n] % MOD
val = fact[2 * n] * big_mod(val, MOD - 2) % MOD
ans = sum * val % MOD
print(ans)


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
n = n * 2
arr = list(map(int, input().split()))
MOD = 998244353
fact = [1] * (n + 1)
for i in range(2, n + 1):
	fact[i] = fact[i - 1] * i % MOD

def ncr(a, b):
	up = fact[a]
	down = fact[b] * fact[b] % MOD
	down = pow(down, MOD - 2, MOD)
	return up * down % MOD
arr.sort()
diff = 0
for i in range(n // 2):
	diff += arr[~i] - arr[i]
c = ncr(n, n // 2)
print(diff * c % MOD)


def ncr(n, r):
	num = 1
	den = 1
	for i in range(r):
		num = num * (n - i) % m
		den = den * (i + 1) % m
	p = num * pow(den, m - 2, m) % m
	return p
m = 998244353
n = int(input())
a = list(map(int, input().split()))
a.sort()
an = abs(sum(a[:n]) - sum(a[n:]))
s = an * ncr(2 * n, n) % m
print(s)


import sys
from sys import stdin

def modfac(n, MOD):
	f = 1
	factorials = [1]
	for m in range(1, n + 1):
		f *= m
		f %= MOD
		factorials.append(f)
	inv = pow(f, MOD - 2, MOD)
	invs = [1] * (n + 1)
	invs[n] = inv
	for m in range(n, 1, -1):
		inv *= m
		inv %= MOD
		invs[m - 1] = inv
	return (factorials, invs)

def modnCr(n, r, mod, fac, inv):
	return fac[n] * inv[n - r] * inv[r] % mod
mod = 998244353
n = int(stdin.readline())
a = list(map(int, stdin.readline().split()))
a.sort()
(fac, inv) = modfac(2 * n + 10, mod)
print(modnCr(2 * n, n, mod, fac, inv) * (sum(a[n:]) - sum(a[:n])) % mod)


MOD = 998244353

def pow_mod(a, n, mod):
	result = 1 % mod
	a_pow_2_pow_bit_index = a % mod
	while n:
		if n & 1:
			result *= a_pow_2_pow_bit_index
			result %= mod
		a_pow_2_pow_bit_index **= 2
		a_pow_2_pow_bit_index %= mod
		n >>= 1
	return result

def inv_mod(x, mod):
	return pow_mod(x, mod - 2, mod)

def factorial_mod(n, mod):
	result = 1 % mod
	for x in range(1, n + 1):
		result *= x
		result %= mod
	return result
n = int(input())
a = sorted(map(int, input().split()))
s = sum((-x for x in a[:n])) + sum((+x for x in a[n:]))
s %= MOD
result = factorial_mod(2 * n, MOD) * inv_mod(factorial_mod(n, MOD) ** 2 % MOD, MOD)
result %= MOD
result *= s
result %= MOD
print(result)


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def ncrmod(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % mod
		den = den * (i + 1) % mod
	return num * pow(den, mod - 2, mod) % mod
n = int(input())
a = list(map(int, input().split()))
mod = 998244353
l1 = sorted(a[:n])
l2 = sorted(a[n:], reverse=True)
diff = sum([abs(l1[i] - l2[i]) for i in range(n)])
out = ncrmod(2 * n, n) * (diff % mod) % mod
print(out)


n = int(input())
a = sorted(map(int, input().split()))
mod = 998244353
z = 0
facn = 1
for i in range(n):
	z += abs(a[i] - a[-(i + 1)])
	facn = facn * (i + 1) % mod
fac2n = facn
for i in range(n + 1, 2 * n + 1):
	fac2n = fac2n * i % mod
invfacn = pow(facn, mod - 2, mod)
print(z * fac2n * invfacn * invfacn % mod)


maxn = 5 * 10 ** 5
mo = 998244353
rev = lambda x: pow(x, mo - 2, mo)
fact = [0] * maxn
fact[0] = 1
for i in range(1, maxn):
	fact[i] = fact[i - 1] * i % mo
ract = [0] * maxn
ract[maxn - 1] = rev(fact[maxn - 1])
for i in range(maxn - 2, -1, -1):
	ract[i] = ract[i + 1] * (i + 1) % mo
C = lambda u, v: fact[u] * ract[v] % mo * ract[u - v] % mo
n = int(input())
a = list(map(int, input().split()))
a.sort()
w = sum(a[n:]) - sum(a[:n])
w %= mo
v = C(n * 2, n)
print(w * v % mo)


import sys, time
from copy import copy, deepcopy as dcopy
from os import path
from collections import *
from heapq import *
from math import *
mod = 998244353

def mpow(a, b):
	ans = 1
	while b:
		if b & 1:
			ans = ans * a % mod
		a = a * a % mod
		b //= 2
	return ans

def solve(kkkk):
	n = inp()
	arr = ina()
	arr.sort()
	ans = 0
	for i in range(2 * n):
		if i < n:
			ans -= arr[i]
		else:
			ans += arr[i]
	ans %= mod
	ans += mod
	ans %= mod
	fact = [1, 1]
	while len(fact) < 2 * n + 5:
		fact.append(fact[-1] * len(fact) % mod)
	inv = mpow(fact[n], mod - 2)
	inv = inv * inv % mod
	ans *= inv
	ans *= fact[2 * n]
	ans %= mod
	out(ans)

def main():
	t = 1
	for i in range(t):
		solve(i + 1)
localsys = 0
start_time = time.time()
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
	localsys = 1
cin = sys.stdin.readline
cout = sys.stdout.write

def inp():
	return int(cin().strip())

def ins():
	return list(cin().strip())

def inm():
	return map(int, cin().strip().split())

def ina():
	return list(map(int, cin().strip().split()))

def out(a):
	cout(str(a) + '\n')

def outa(a):
	cout(' '.join(map(str, a)) + '\n')

def outm(a, b, c=None, d=None):
	cout(str(a) + ' ' + str(b))
	if c != None:
		cout(' ' + str(c))
	if d != None:
		cout(' ' + str(d))
	cout('\n')
main()
if localsys:
	print('\n\nTime Elapsed :', time.time() - start_time, 'seconds')


mod = 998244353

def dev(a, b):
	return a * pow(b, mod - 2, mod) % mod

def fac(a):
	d = 1
	for i in range(1, a + 1):
		d *= i
		d %= mod
	return d
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
s = sum(arr[n:]) - sum(arr[:n])
f = dev(fac(2 * n) % mod, fac(n) ** 2 % mod)
print(f * s % mod)


def pwm(a, n, md):
	p = 1
	while n:
		if n & 1:
			p = p * a % md
		a = a * a % md
		n >>= 1
	return p
n = int(input())
ar = list(map(int, input().split()))
ar.sort()
ans = 0
nom = 1
dnom = 1
mod = 998244353
for i in range(0, n):
	ans = (ans + ar[i + n] - ar[i]) % mod
	nom = nom * (i + n + 1) % mod
	dnom = dnom * (i + 1) % mod
print(ans * nom % mod * pwm(dnom, mod - 2, mod) % mod)


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	n = int(input())
	a = list(map(int, input().split()))
	sa = sorted(a)
	mod = 998244353

	def quickpower(a, n, p):
		ans = 1
		while n:
			if n & 1:
				ans = ans * a % p
			a = a * a % p
			n = n >> 1
		return ans

	def inverse(a, p):
		return quickpower(a, p - 2, p)
	fact = [1] * (2 * n + 1)
	infact = [1] * (2 * n + 1)
	for i in range(1, 2 * n + 1):
		fact[i] = fact[i - 1] * i % mod
		infact[i] = infact[i - 1] * quickpower(i, mod - 2, mod) % mod
	cnt = fact[2 * n] * infact[n] % mod * infact[n] % mod
	ans = cnt * (sum([sa[i] for i in range(n, 2 * n)]) - sum([sa[i] for i in range(n)]))
	print(ans % mod)
main()


import sys
import math, bisect
sys.setrecursionlimit(10 ** 5)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))
n = I()
A = Neo()
mod = 998244353
fact = [1]
for i in range(1, 2 * n + 1):
	fact += [fact[-1] * i % mod]
(B, C) = (A[0::2], A[1::2])
B.sort()
C.sort(reverse=True)
Ans = 0
for (i, j) in zip(B, C):
	Ans += abs(i - j)
	Ans = Ans % mod
Ans = Ans * fact[2 * n] * pow(fact[n] * fact[n], mod - 2, mod) % mod
print(Ans)


n = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
p = 998244353
x = 1
for i in range(n + 1, 2 * n + 1):
	x *= i
	x %= p
x2 = 1
for i in range(1, n + 1):
	x2 *= i
	x2 %= p
x *= pow(x2, p - 2, p)
x %= p
Ans = 0
for i in range(n):
	Ans += A[i] * x
for i in range(n):
	Ans -= A[n + i] * x
Ans %= p
print(Ans)


from sys import stdin, stdout
input = stdin.readline
m = 998244353

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
t = 1
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	arr = sorted(arr)
	ans = abs(sum(arr[0:n]) - sum(arr[n:])) % m * ncr(2 * n, n, m) % m
	print(ans)


def ncr(n, r, p):
	num = 1
	den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def solve(n, a):
	a.sort()
	M = 998244353
	ss = sum(a[:n])
	ls = sum(a[n:])
	return (ls - ss) * ncr(2 * n, n, M) % M
n = int(input())
a = list(map(int, input().split()))
print(solve(n, a))


mod = 998244353

def pow_(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def reverse(x, mod):
	return pow_(x, mod - 2, mod)
gt = [1] * 300001
for i in range(2, 300001):
	gt[i] = i * gt[i - 1] % mod
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
cof = gt[2 * n] * reverse(gt[n], mod) * reverse(gt[n], mod)
ans = (sum(a[n:]) - sum(a[:n])) * cof % mod
print(ans)


import sys
from array import array
from typing import List, Tuple, TypeVar, Generic, Sequence, Union

def input():
	return sys.stdin.buffer.readline().decode('utf-8')

def main():
	n = int(input())
	a = sorted(map(int, input().split()))
	max_n = 2 * n + 1
	mod = 998244353
	(fac, inv) = ([1] * max_n, [1] * max_n)
	for i in range(2, max_n):
		fac[i] = fac[i - 1] * i % mod
	inv[-1] = pow(fac[-1], mod - 2, mod)
	for i in range(max_n - 1, 0, -1):
		inv[i - 1] = inv[i] * i % mod
	ans = sum((abs(a[i] - a[-i - 1]) for i in range(n))) * fac[2 * n] * inv[n] * inv[n] % mod
	print(ans)
main()


from sys import stdin
input = stdin.readline

def A():
	t = int(input())
	for _ in range(t):
		(n, x) = map(int, input().split())
		a = list(map(int, input().split()))
		b = list(map(int, input().split()))
		if _ != t - 1:
			input()
		b.sort(reverse=True)
		a.sort()
		truth = True
		for i in range(n):
			if a[i] + b[i] > x:
				truth = False
				break
		if truth:
			print('Yes')
		else:
			print('No')

def B():
	t = int(input())
	for _ in range(t):
		(a, b, c, d) = map(int, input().split())
		print(max(a + b, c + d))

def D():
	n = int(input())
	a = sorted(list(map(int, input().split())))
	mod = 998244353
	s = 0
	ans = sum(a)
	for i in a[0:n]:
		ans -= 2 * i
	ans %= mod
	num = 1
	denom = 1
	for i in range(n + 1, 2 * n + 1):
		num *= i
		num %= mod
	for i in range(1, n + 1):
		denom *= i
		denom %= mod
	denom = pow(denom, mod - 2, mod)
	mult = num * denom % mod
	print(mult * ans % mod)
D()


mod = 998244353
n = int(input())
arr = [int(j) for j in input().split()]
fact = [1] * (3 * n)
for i in range(1, 3 * n):
	fact[i] = fact[i - 1] * i % mod
arr.sort()
print((sum(arr[n:]) - sum(arr[:n])) * fact[2 * n] * pow(fact[n], mod - 2, mod) ** 2 % mod)


import os
import sys
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ALPHA = 'abcdefghijklmnopqrstuvwxyz/'
M = 1000000007
EPS = 1e-06

def Ceil(a, b):
	return a // b + int(a % b > 0)

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
M = 998244353

def nCr(n, r, p=M):
	num = 1
	den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
n = Int()
a = sorted(array(), reverse=True)
total = nCr(2 * n, n)
ans = 0
for i in range(2 * n):
	if i < n:
		ans = (ans + a[i]) % M
	else:
		ans = (ans - a[i] + M) % M
print(total * ans % M)


import os
from io import BytesIO, IOBase
import sys
from collections import defaultdict, deque, Counter
from bisect import *
from math import sqrt, pi, ceil, log, inf, gcd
from itertools import permutations
from copy import deepcopy
from heapq import *

def main():
	n = int(input())
	a = sorted(map(int, input().split()))
	mod = 998244353
	z = 0
	facn = 1
	for i in range(n):
		z += abs(a[i] - a[-(i + 1)])
		facn = facn * (i + 1) % mod
	fac2n = facn
	for i in range(n + 1, 2 * n + 1):
		fac2n = fac2n * i % mod
	invfacn = pow(facn, mod - 2, mod)
	print(z * fac2n * invfacn * invfacn % mod)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


mod = 998244353
n = int(input())
a = sorted(list(map(int, input().split())))
c = 0
for i in range(n):
	c += abs(a[i] - a[2 * n - i - 1])
f = [1, 1]
for i in range(2, 2 * n + 1):
	f.append(f[-1] * i % mod)
print(c * (f[2 * n] * pow(f[n] * f[n] % mod, mod - 2, mod)) % mod % mod)


import sys
import math
import bisect
import heapq
from bisect import bisect_right
from sys import stdin, stdout

def get_ints_in_variables():
	return map(int, sys.stdin.readline().strip().split())

def get_int():
	return int(sys.stdin.readline())

def get_ints_in_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_list_of_list(n):
	return [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]

def get_string():
	return sys.stdin.readline().strip()

def power(a, b, mod):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % mod
		a = a * a % mod
		b = b // 2
	return res

def Solution(arr, n):
	mod = 998244353
	firstSum = 0
	for i in range(n):
		firstSum = (firstSum + arr[i]) % mod
	backSum = 0
	for i in range(2 * n - 1, n - 1, -1):
		backSum = (backSum + arr[i]) % mod
	res = (backSum - firstSum) % mod
	fact = 1
	for i in range(1, n + 1):
		res = res * (n + i) % mod
		fact = fact * i % mod
	res = res * power(fact, mod - 2, mod) % mod
	print((res + mod) % mod)

def main():
	n = get_int()
	arr = sorted(get_ints_in_list())
	Solution(arr, n)
main()


import sys
import math
from collections import defaultdict, Counter

def power(x, y, m):
	if y == 0:
		return 1
	p = power(x, y // 2, m) % m
	p = p * p % m
	if y % 2 == 0:
		return p
	else:
		return x * p % m

def find(n):
	p = 1
	q = 1
	c = 1
	while c <= n // 2:
		p = p * (n - c + 1) % mod
		q = q * c % mod
		c += 1
	return p * power(q, mod - 2, mod) % mod
mod = 998244353
n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(n):
	ans = (ans + a[i + n] - a[i]) % mod
mul = find(2 * n)
print(ans * mul % mod)


MOD = 998244353
n = int(input())
s = [int(x) for x in input().split()]
s.sort()
N = 2 * n
m1 = 1
for i in range(1, N + 1):
	m1 = m1 * i % MOD
m2 = 1
for i in range(1, n + 1):
	m2 = m2 * i % MOD
tt = m2 * m2 % MOD
dem = pow(tt, MOD - 2, MOD) % MOD
val = m1 * dem % MOD
ans1 = 0
for i in range(0, n):
	ans1 = ans1 + s[i]
ans2 = 0
for i in range(n, len(s)):
	ans2 = ans2 + s[i]
ans = (ans2 - ans1 + MOD) % MOD
ans = ans * val % MOD
print(ans)


def res(n):
	nu = s = 1
	for i in range(n):
		nu = nu * (2 * n - i) % m
		s = s * (i + 1) % m
	return nu * pow(s, m - 2, m) % m
m = 998244353
n = int(input())
fg = sorted(list(map(int, input().split())))
f = abs(sum(fg[:n]) - sum(fg[n:]))
print(f * res(n) % m)


import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
mod = 998244353
mv = 150000

def mI(a, m):
	m0 = m
	y = 0
	x = 1
	if m == 1:
		return 0
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x = x + m0
	return x
V = []
v = 1
for i in range(mv + 1):
	V.append(mI(i, mod))

def main():
	n = int(input())
	A = list(map(int, input().split()))
	ans = 0
	A.sort()
	for i in range(n):
		ans = (ans + abs(-A[i] + A[2 * n - i - 1])) % mod
	c = 1
	for i in range(n):
		c = c * (2 * n - i) % mod
		c = c * V[i + 1] % mod
	print(ans * c % mod)
main()


import sys, math
from math import factorial as fact
mod = 10 ** 9 + 7
m = 998244353
input = lambda : sys.stdin.readline().strip()
inp = lambda : list(map(int, input().split()))

def binexp(a, n, m):
	res = 1
	while n > 0:
		if n % 2 == 1:
			res = res * a % m
		a = a * a % m
		n = n >> 1
	return res

def C(n, r, m):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % m
		den = den * (i + 1) % m
	res = num * binexp(den, m - 2, m) % m
	return res
n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = sum([a[2 * n - 1 - i] - a[i] for i in range(n)])
print(C(2 * n, n, m) * (ans % m) % m)


def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def testcase():
	n = int(input())
	arr = list(map(int, input().split()))
	mod = 998244353
	arr.sort()
	c = ncr(2 * n, n, mod)
	ans = 0
	for i in range(n):
		ans = (ans - arr[i] * c % mod) % mod
	for i in range(n, 2 * n):
		ans = (ans + arr[i] * c % mod) % mod
	print(ans)
	return
import sys, os
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
sys.setrecursionlimit(10 ** 5)
testcase()


def choose(n):
	global mod
	num = den = 1
	for i in range(n):
		num = num * (2 * n - i) % mod
		den = den * (i + 1) % mod
	return num * pow(den, mod - 2, mod) % mod
mod = 998244353
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
a = arr[:n]
b = arr[n:]
b.sort(reverse=True)
total = 0
for i in range(n):
	total += abs(b[i] - a[i])
	total = total % 998244353
print(total * choose(n) % 998244353)


mod = 998244353

def nCr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
n = int(input())
v = list(map(int, input().split()))
v[:] = sorted(v)
diff = 0
for i in range(2 * n):
	if i < n:
		diff -= v[i]
	else:
		diff += v[i]
print(int(int(nCr(2 * n, n, mod) % mod) * diff % mod))


n = int(input())
ar = sorted(list(map(int, input().split())))
ans = 0
nom = 1
dnom = 1
mod = 998244353
for i in range(n):
	ans = (ans + ar[i + n] - ar[i]) % mod
	nom = nom * (i + n + 1) % mod
	dnom = dnom * (i + 1) % mod
print(ans * nom % mod * pow(dnom, mod - 2, mod) % mod)


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()

def nCr(com_n, com_r):
	if com_n < com_r:
		return 0
	return fac[com_n] * ifac[com_r] % md * ifac[com_n - com_r] % md
md = 998244353
n_max = 300005
fac = [1]
for i in range(1, n_max + 1):
	fac.append(fac[-1] * i % md)
ifac = [1] * (n_max + 1)
ifac[n_max] = pow(fac[n_max], md - 2, md)
for i in range(n_max - 1, 1, -1):
	ifac[i] = ifac[i + 1] * (i + 1) % md
n = II()
aa = LI()
aa.sort()
ans = 0
for i in range(n):
	ans += -aa[i] + aa[2 * n - 1 - i]
	ans %= md
ans *= nCr(2 * n, n)
ans %= md
print(ans)


import sys
import math
import collections
input = sys.stdin.readline
mod = 998244353

def fact(n):
	prod = 1
	for i in range(2, n + 1):
		prod = prod * i % mod
	return prod

def ncr(n):
	k = fact(n) * fact(n) % mod
	k1 = pow(k, mod - 2, mod)
	return fact(2 * n) * k1 % mod
n = int(input())
l = sorted([int(i) for i in input().split()])
s1 = 0
s2 = 0
for i in range(n):
	s1 += l[i]
	s2 += l[n + i]
print((s2 - s1) % mod * ncr(n) % mod)