Problem: Given are two sequences A and B, both of length N. A and B are each sorted in the ascending order. Check if it is possible to reorder the terms of B so that for each i (1 \leq i \leq N) A_i \neq B_i holds, and if it is possible, output any of the reorderings that achieve it.

Constraints

* 1\leq N \leq 2 \times 10^5
* 1\leq A_i,B_i \leq N
* A and B are each sorted in the ascending order.
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N
A_1 A_2 \cdots A_N
B_1 B_2 \cdots B_N


Output

If there exist no reorderings that satisfy the condition, print `No`.

If there exists a reordering that satisfies the condition, print `Yes` on the first line. After that, print a reordering of B on the second line, separating terms with a whitespace.

If there are multiple reorderings that satisfy the condition, you can print any of them.

Examples

Input

6
1 1 1 2 2 3
1 1 1 2 2 3


Output

Yes
2 2 3 1 1 1


Input

3
1 1 2
1 1 3


Output

No


Input

4
1 1 2 3
1 2 3 3


Output

Yes
3 3 1 2

Solution (in PYTHON3):

Solution:
#!/usr/bin/env python3

import collections
import sys
input=sys.stdin.readline

n=int(input())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
cnt1=collections.Counter(arr1)
cnt2=collections.Counter(arr2)
tmp=[[key,cnt1[key]] for key in cnt1.keys()]
tmp=sorted(tmp,reverse=True,key=lambda x:x[1])
arr3=[]
for key,cnt in tmp:
    for _ in range(cnt):
        arr3.append(key)
cnt1=collections.Counter(arr3)
ans=[0]*n
acum=0
pos=0
blank=0
ok=0
head=[]
for key in cnt1.keys():
    tcnt1=cnt1[key]
    tcnt2=cnt2[key]
    acum+=tcnt1
    tpos=max(acum,pos)
    tmp=n-min(tpos,n)
    if blank+tmp<tcnt2:
        print('No')
        exit()
    blank=min(tpos,n)-ok
    remain=tcnt2
    #print(key,blank,remain)
    for i in range(tpos,n):
        if remain==0:
            break
        ans[i]=key
        ok+=1
        remain-=1
        cnt2[key]-=1
    for _ in range(remain):
        head.append(key)
        cnt2[key]-=1
    pos=min(tpos+tcnt2,n)
    #print(ans,head,pos)
for key in cnt2.keys():
    if cnt2[key]==0:
        continue
    for _ in range(cnt2[key]):
        head.append(key)
pos=0
for i in range(n):
    if ans[i]==0:
        ans[i]=head[pos]
        pos+=1
tmp=[[ans[i],arr3[i]] for i in range(n)]
tmp=sorted(tmp,key=lambda x:x[1])
ans=[tmp[i][0] for i in range(n)]
print('Yes')
print(*ans)