There are $n$ children numbered from $1$ to $n$ in a kindergarten. Kindergarten teacher gave $a_i$ ($1 \leq a_i \leq n$) candies to the $i$-th child. Children were seated in a row in order from $1$ to $n$ from left to right and started eating candies. 

While the $i$-th child was eating candies, he calculated two numbers $l_i$ and $r_i$ — the number of children seating to the left of him that got more candies than he and the number of children seating to the right of him that got more candies than he, respectively.

Formally, $l_i$ is the number of indices $j$ ($1 \leq j < i$), such that $a_i < a_j$ and $r_i$ is the number of indices $j$ ($i < j \leq n$), such that $a_i < a_j$.

Each child told to the kindergarten teacher the numbers $l_i$ and $r_i$ that he calculated. Unfortunately, she forgot how many candies she has given to each child. So, she asks you for help: given the arrays $l$ and $r$ determine whether she could have given the candies to the children such that all children correctly calculated their values $l_i$ and $r_i$, or some of them have definitely made a mistake. If it was possible, find any way how she could have done it.


-----Input-----

On the first line there is a single integer $n$ ($1 \leq n \leq 1000$) — the number of children in the kindergarten.

On the next line there are $n$ integers $l_1, l_2, \ldots, l_n$ ($0 \leq l_i \leq n$), separated by spaces.

On the next line, there are $n$ integer numbers $r_1, r_2, \ldots, r_n$ ($0 \leq r_i \leq n$), separated by spaces.


-----Output-----

If there is no way to distribute the candies to the children so that all of them calculated their numbers correctly, print «NO» (without quotes).

Otherwise, print «YES» (without quotes) on the first line. On the next line, print $n$ integers $a_1, a_2, \ldots, a_n$, separated by spaces — the numbers of candies the children $1, 2, \ldots, n$ received, respectively. Note that some of these numbers can be equal, but all numbers should satisfy the condition $1 \leq a_i \leq n$. The number of children seating to the left of the $i$-th child that got more candies than he should be equal to $l_i$ and the number of children seating to the right of the $i$-th child that got more candies than he should be equal to $r_i$. If there is more than one solution, find any of them.


-----Examples-----
Input
5
0 0 1 1 2
2 0 1 0 0

Output
YES
1 3 1 2 1

Input
4
0 0 2 0
1 1 1 1

Output
NO

Input
3
0 0 0
0 0 0

Output
YES
1 1 1



-----Note-----

In the first example, if the teacher distributed $1$, $3$, $1$, $2$, $1$ candies to $1$-st, $2$-nd, $3$-rd, $4$-th, $5$-th child, respectively, then all the values calculated by the children are correct. For example, the $5$-th child was given $1$ candy, to the left of him $2$ children were given $1$ candy, $1$ child was given $2$ candies and $1$ child — $3$ candies, so there are $2$ children to the left of him that were given more candies than him.

In the second example it is impossible to distribute the candies, because the $4$-th child made a mistake in calculating the value of $r_4$, because there are no children to the right of him, so $r_4$ should be equal to $0$.

In the last example all children may have got the same number of candies, that's why all the numbers are $0$. Note that each child should receive at least one candy.

Difficulty: interview

Starter code:

Solutions:
n=int(input())
#x,y,z,t1,t2,t3=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

s=[0]*n

ans=True

for i in range(n):
    ans=ans and a[i]<=i and b[i]<=(n-i-1)
    s[i]=n-a[i]-b[i]

def qwe(s,j):
    l,r=0,0
    for i in range(len(s)):
        if i<j and s[i]>s[j]: l+=1
        elif i>j and s[i]>s[j]: r+=1
    return l,r



if ans:
    for i in range(n):
        l,r=qwe(s,i)
        ans=ans and a[i]==l and b[i]==r
        
    

    
if ans:
    print('YES')
    for i in range(n):
        print(n-a[i]-b[i],end=' ')
else: print('NO')





n=int(input())

l=list(map(int,input().split()))
r=list(map(int,input().split()))

a=[[l[i]+r[i],i] for i in range(n)]
a.sort()
#print(a)
candies=[0 for i in range(n)]

if(a[0][0] != 0):
    
    print('NO')
    return
else:
    candies[a[0][1]] = n - a[0][0]

for i in range(1,n):
    if(a[i][0] != a[i-1][0] and a[i][0]!=i):
        print('NO')
 #       print(i,a[i])
        return
  #  print(a[i][1],n-a[i][0],i)
    candies[a[i][1]] = n - a[i][0]
#print(candies)
for i in range(n):
    l1=0
    r1=0
    for j in range(i):
        if(candies[j]>candies[i]):
            l1+=1
    for j in range(i+1,n):
        if(candies[j]>candies[i]):
            r1+=1
 #   print(l1,r1)
    if(l1 != l[i] or r1 != r[i]):
        print('NO')
        return
print('YES')
print(*candies)



n=int(input())
l=list(map(int,input().split()))
r=list(map(int,input().split()))
candies=[]
for i in range(n):
    candies.append(n-l[i]-r[i])
left=[]
for i in range(n):
    guys=0
    for j in range(i):
        if candies[j]>candies[i]:
            guys+=1
    left.append(guys)
right=[]
for i in range(n):
    guys=0
    for j in range(i,n):
        if candies[j]>candies[i]:
            guys+=1
    right.append(guys)
if left==l and right==r:
    print("YES")
    candiesstr=""
    for i in range(n):
        candiesstr+=str(candies[i])+" "
    print(candiesstr[:len(candiesstr)-1])
else:
    print("NO")

import sys
n = int(input())
l = list(map(int, input().split()))
r = list(map(int, input().split()))
res = [0] * n
for i in range(n):
    res[i] = n - l[i] - r[i]
for i in range(n):
    ok = 0
    for j in range(i):
        if res[j] > res[i]:
            ok += 1
    if ok != l[i]:
        print("NO")
        return
    ok = 0
    for j in range(i + 1, n):
        if res[j] > res[i]:
            ok += 1
    if ok != r[i]:
        print("NO")
        return
print("YES")
print(' '.join(map(str, res)))


n = int(input())
l = list(map(int, input().split()))
r = list(map(int, input().split()))
fl = 0
m = n
s = list(range(n))
for i in range(n):
    s[i] = m - (l[i] + r[i])
    if fl != 1 and s[i] == m:
        fl = 1
for i in range(n):
    ll = 0;
    for j in range(i):
        if s[j] > s[i]:
            ll += 1
    rr = 0
    for j in range(i + 1, n):
        if s[j] > s[i]:
            rr += 1
    if l[i] != ll or rr != r[i]:
        fl = 0
        break

if fl == 1 and l[0] == 0 and r[n - 1] == 0:
    print('YES')
    print(*s)
else:
    print('NO')




n=int(input())
l=list(map(int,input().split()))
r=list(map(int,input().split()))
c=[n]*n
for i in range(n):
    c[i]-=(r[i]+l[i])
for i in range(n):
    m=0
    for j in range(0,i):
        if c[j]>c[i]:
            m+=1
    if m!=l[i]:
        print('NO');return
for i in range(n):
    m=0
    for j in range(i+1,n):
        if c[j]>c[i]:
            m+=1
    if m!=r[i]:
        print('NO');return
print('YES')
print(*(c))


3.5

N = int(input())
L = [int(s) for s in input().split(" ")]
R = [int(s) for s in input().split(" ")]

C = [N - L[i] - R[i] for i in range(0, N)]

for i, x in enumerate(C):
    if C[i] <= 0:
        print("NO")
        return

    l = 0
    r = 0

    j = i-1
    while j >= 0:
        if C[j] > C[i]:
            l = l + 1
            
        j = j - 1

    j = i+1
    while j < N:
        if C[j] > C[i]:
            r = r + 1

        j = j + 1

    if L[i] != l or R[i] != r:
        print("NO")
        return

print("YES")
for i in range(0, N-1):
    print(C[i], end=" ")

print(C[N-1])



def main():
    n = int(input())
    left = [int(x) for x in input().strip().split()]
    right = [int(x) for x in input().strip().split()]
    rank = [x + y for (x,y) in zip(left,right)]
    arr = [(n - r) for r in rank]

    # check left
    for i in range(n):
        more = 0
        for j in range(i):
            if arr[j] > arr[i]:
                more += 1
        if more != left[i]:
            print('NO')
            return
    
    # check right
    for i in range(n):
        more = 0
        for j in range(i+1,n):
            if arr[j] > arr[i]:
                more += 1
        if more != right[i]:
            print('NO')
            return

    print('YES')
    for x in arr:
        print(x, end=' ')
    print()


def __starting_point():
    main()
__starting_point()

n = int(input())
l = tuple(map(int,input().split()))
r = tuple(map(int,input().split()))
s = [ (i,sum(v)) for i,(v) in enumerate(zip(l,r)) ]
ss = sorted(s, key= lambda a:a[1] )

candies = [0]*n
for p in ss:
    candies[p[0]] = n-p[1]

ll = [0]
for i in range(1,n):
    ll.append(sum([1 for c in candies[:i] if c > candies[i]]))

rr = [0]
for i in range(n-2,-1,-1):
    rr.append(sum([1 for c in candies[i:] if c > candies[i]]))

for i in range(n):
    if ll[i] != l[i]:
        print("NO")
        break
    if rr[n-1-i] != r[i]:
        print("NO")
        break
    if i == n-1:
        print("YES")
        print(' '.join(map(str,candies)))


def lr(a):
    l = [0] * len(a)
    r = [0] * len(a)
    for i in range(len(a)):
        for j in range(i+1, len(a)):
            if a[j] > a[i]:
                r[i] += 1
            if a[i] > a[j]:
                l[j] += 1
    return l, r


n = int(input())
l = [int(i) for i in input().split()]
r = [int(i) for i in input().split()]
a = [0] * n
for i in range(n):
    for j in range(n):
        if l[j] + r[j] == i:
            a[j] = n-i
l1, r1 = lr(a)
if l1 != l or r1 != r:
    print("NO")
else:
    print("YES")
    print(' '.join([str(i) for i in a]))


n = int(input())
l = list(map(int, input().split(" ")))
r = list(map(int, input().split(" ")))

slr = [l[i]+r[i] for i in range(n)]
ans = [n-slr[i] for i in range(n)]

flag = True
if l[0]!=0 or r[n-1]!=0:
	flag= False

for i in range(n):
	great = 0
	for j in range(i+1, n):
		if ans[i]<ans[j]:
			great = great + 1
	if r[i]!=great:
		flag = False
		break
for i in range(n-1, -1, -1):
	great = 0
	for j in range(i-1, -1, -1):
		if ans[i]<ans[j]:
			great = great + 1
	if l[i]!=great:
		flag = False
		break

if flag:
	print("YES")
	for i in range(0, n-1):
		print(ans[i], end=" ")
	print(ans[n-1])
else:
	print("NO")


n=int(input())
le=[int(i) for i in input().split()]
ri=[int(i) for i in input().split()]
notp = False
check=[]
for i in range(n):
    check.append(n-le[i]-ri[i])
for i in range(n):
    tot=0
    for j in range(i-1,-1,-1):
        if(check[j]>check[i]):
            tot+=1
    if(tot!=le[i]):
        notp=True
        break
if(notp==False):
    for i in range(n):
        tot=0
        for j in range(i+1,n):
            if(check[j]>check[i]):
                tot+=1
        if(tot!=ri[i]):
            notp=True
            break
if(notp):
    print('NO')
else:
    print('YES')
    print(*check)