There are $n$ students at your university. The programming skill of the $i$-th student is $a_i$. As a coach, you want to divide them into teams to prepare them for the upcoming ICPC finals. Just imagine how good this university is if it has $2 \cdot 10^5$ students ready for the finals!

Each team should consist of at least three students. Each student should belong to exactly one team. The diversity of a team is the difference between the maximum programming skill of some student that belongs to this team and the minimum programming skill of some student that belongs to this team (in other words, if the team consists of $k$ students with programming skills $a[i_1], a[i_2], \dots, a[i_k]$, then the diversity of this team is $\max\limits_{j=1}^{k} a[i_j] - \min\limits_{j=1}^{k} a[i_j]$).

The total diversity is the sum of diversities of all teams formed.

Your task is to minimize the total diversity of the division of students and find the optimal way to divide the students.


-----Input-----

The first line of the input contains one integer $n$ ($3 \le n \le 2 \cdot 10^5$) — the number of students.

The second line of the input contains $n$ integers $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 10^9$), where $a_i$ is the programming skill of the $i$-th student.


-----Output-----

In the first line print two integers $res$ and $k$ — the minimum total diversity of the division of students and the number of teams in your division, correspondingly.

In the second line print $n$ integers $t_1, t_2, \dots, t_n$ ($1 \le t_i \le k$), where $t_i$ is the number of team to which the $i$-th student belong.

If there are multiple answers, you can print any. Note that you don't need to minimize the number of teams. Each team should consist of at least three students.


-----Examples-----
Input
5
1 1 3 4 2

Output
3 1
1 1 1 1 1 

Input
6
1 5 12 13 2 15

Output
7 2
2 2 1 1 2 1 

Input
10
1 2 5 129 185 581 1041 1909 1580 8150

Output
7486 3
3 3 3 2 2 2 2 1 1 1 



-----Note-----

In the first example, there is only one team with skills $[1, 1, 2, 3, 4]$ so the answer is $3$. It can be shown that you cannot achieve a better answer.

In the second example, there are two teams with skills $[1, 2, 5]$ and $[12, 13, 15]$ so the answer is $4 + 3 = 7$.

In the third example, there are three teams with skills $[1, 2, 5]$, $[129, 185, 581, 1041]$ and $[1580, 1909, 8150]$ so the answer is $4 + 912 + 6570 = 7486$.

Difficulty: introductory

Starter code:

Solutions:
import sys
input = sys.stdin.readline

n=int(input())
A=list(map(int,input().split()))

B=[(a,ind) for ind,a in enumerate(A)]
B.sort()
    
DP=[0]*(n+1)

for i in range(3,n-2):
    DP[i]=max(DP[i-1],DP[i-3]+B[i][0]-B[i-1][0])

#print(DP)

MAX=max(DP)

x=DP.index(MAX)

REMLIST=[]

while x>0:
    if DP[x]==DP[x-1]:
        x-=1
    else:
        REMLIST.append(x)
        x-=3

REMLIST.sort()
REMLIST.append(1<<60)

print(max(A)-min(A)-MAX,len(REMLIST))

ANS=[-1]*n
remind=0
NOW=1

for i in range(n):
    if i==REMLIST[remind]:
        NOW+=1
        remind+=1
    ANS[B[i][1]]=NOW
print(*ANS)




n = int(input())
l = list(map(int,input().split()))
a = [[l[i], i] for i in range(n)]
a.sort()
ll = l.copy()
ll.sort()
if n < 6:
	print(a[-1][0] - a[0][0], 1)
	print(*([1] * n))
else:
	b = [ll[i] - ll[i-1] for i in range(3, n - 2)]
	#wybieramy najwieksza sume z b ale nie moge wybrac ziomow o mniej niz 2 od siebie
	dp = [[0,0] for i in range(len(b) + 5)]
	i = len(b) - 1
	dp[i] = [0, b[i]]
	while i >= 0:
		dp[i][0] = max(dp[i+1])
		dp[i][1] = max(dp[i+3]) + b[i]
		i-=1
	odp = []
	i = 0
	while True:
		if dp[i] == [0,0]:
			break
		if dp[i][1] > dp[i][0]:
			odp.append(i)
			i += 3
		else:
			i += 1
	odp = [i+3 for i in odp]
	grupy = [0] * n
	grupa = 1
	wsk = 0
	for i in range(n):
		if wsk <= len(odp)-1:
			if i == odp[wsk]:
				wsk += 1
				grupa += 1
		grupy[a[i][1]] = grupa
	print(ll[-1] - ll[0] - max(dp[0]), grupa)
	print(*grupy)

n=int(input())
a=sorted((int(v),i) for i,v in enumerate(input().split()))
INF=10**18
dp=[-INF,-INF,0]
for i in range(n-1):
    dp.append(max(dp[-1],dp[i]+a[i+1][0]-a[i][0]))
cur,t = n-1,1
o=[0]*n
while cur >= 0:
    if dp[cur] == dp[cur-1]:
        o[a[cur][1]] = t
        cur -= 1
    else:
        o[a[cur][1]] = o[a[cur-1][1]] = o[a[cur-2][1]] = t
        cur -= 3
        t += 1
print(a[-1][0] - a[0][0] - dp[n-1], t-1)
print(*o)

n=int(input())
a=sorted((int(v),i) for i,v in enumerate(input().split()))
INF=10**18
dp=[-INF,-INF,0]
for i in range(n-1):
    dp.append(max(dp[-1],dp[i]+a[i+1][0]-a[i][0]))
cur,t = n-1,1
o=[0]*n
while cur >= 0:
    if dp[cur] == dp[cur-1]:
        o[a[cur][1]] = t
        cur -= 1
    else:
        o[a[cur][1]] = o[a[cur-1][1]] = o[a[cur-2][1]] = t
        cur -= 3
        t += 1
print(a[-1][0] - a[0][0] - dp[n-1], t-1)
print(*o)

n=int(input())
a=sorted((int(v),i) for i,v in enumerate(input().split()))
INF=10**18
dp=[-INF,-INF,0]
for i in range(n-1):
    dp.append(max(dp[-1],dp[i]+a[i+1][0]-a[i][0]))
cur,t = n-1,1
o=[0]*n
while cur >= 0:
    if dp[cur] == dp[cur-1]:
        o[a[cur][1]] = t
        cur -= 1
    else:
        o[a[cur][1]] = o[a[cur-1][1]] = o[a[cur-2][1]] = t
        cur -= 3
        t += 1
print(a[-1][0] - a[0][0] - dp[n-1], t-1)
print(*o)

n=int(input())
a=sorted((int(v),i) for i,v in enumerate(input().split()))
INF=10**18
dp=[-INF,-INF,0]
for i in range(n-1):
    dp.append(max(dp[-1],dp[i]+a[i+1][0]-a[i][0]))
cur,t = n-1,1
o=[0]*n
while cur >= 0:
    if dp[cur] == dp[cur-1]:
        o[a[cur][1]] = t
        cur -= 1
    else:
        o[a[cur][1]] = o[a[cur-1][1]] = o[a[cur-2][1]] = t
        cur -= 3
        t += 1
print(a[-1][0] - a[0][0] - dp[n-1], t-1)
print(*o)