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
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

D = [[0, i] for i in range(N + 1)]


for i in range(N):
  a = A[i]
  b = B[i]
  D[a][0] += 1
  D[b][0] += 1

for d in D:
  if d[0] > N:
    print("No")
    exit()

print("Yes")

an = 0
am = 0
bn = 0
bm = 0
D = [1] * N
while an < N and bn < N:
  if A[an] == B[bn]:
    c = A[an]
  else:
    if A[an] > B[bn]:
      bn += 1
    else:
      an += 1
    continue
  am = an
  bm = bn
  while True:
    if am + 1 >= N:
      break
    if A[am + 1] == c:
      am += 1
    else:
      break
  while True:
    if bm + 1 >= N:
      break
    if B[bm + 1] == c:
      bm += 1
    else:
      break
  l = an - bm
  r = am - bn
  if l >= 0:
    for i in range(l, r + 1):
      D[i] = 0
  elif r >= 0:
    for i in range(l + N, N):
      D[i] = 0
    for i in range(r + 1):
      D[i] = 0
  else:
    for i in range(l + N, r + N):
      D[i] = 0
  an = am + 1
  bn = bm + 1

for i in range(N):
  if D[i] == 1:
    s = i
    break
else:
  print("No")
  exit()

Ans = [0] * N
for i in range(N):
  Ans[(i + s) % N] = B[i]

print(" ".join(list(map(str, Ans))))
