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
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int[] b = new int[n];
    int[] r = new int[n + 1];
    for(int i = 0; i < n; i++) {
      a[i] = sc.nextInt();
      r[a[i]]++;
    }
    for(int i = 0; i < n; i++) {
      b[i] = sc.nextInt();
      r[b[i]]++;
    }

    int p = 0;
    for(int i = 1; i <= n; i++) {
      if(r[i] > n) p++;
    }
    if(p > 0) {
      System.out.println("No");
    } else {
      System.out.println("Yes");
      int[] c = new int[n];
      for(int i = n - 1; i >= 0; i--) {
        c[n - 1 - i] = b[i];
      }
      int q = 0;
      int x = 0;
      int t1 = n;
      int t2 = 0;
      for(int i = 0; i < n; i++) {
        if(a[i] == c[i]) {
          q++;
          x = a[i];
          t1 = Math.min(t1, i);
          t2 = Math.max(t2, i);
        }
      }
      if(q == 0) {
        for(int i = 0; i < n; i++) {
          System.out.print(c[i] + " ");
        }
      } else {
        int s11 = -1;
        int s12 = n;
        int s21 = -1;
        int s22 = n;
        
        for(int i = 0; i < n; i++) {
          if((a[i] != x) && (i < t1)) s11 = i;
          if((a[i] != x) && (i > t2)) s12 = Math.min(s12, i);
        }

        for(int i = 0; i < n; i++) {
          if((c[i] != x) && (i < t1)) s21 = i;
          if((c[i] != x) && (i > t2)) s22 = Math.min(s22, i);
        }

        int s = Math.min(s11, s21);
        int t = Math.max(s12, s22);
        
        int k = 0;
        for(int i = t1; i <= t2; i++) {
          int temp = c[i];
          if(k <= s) {
            c[i] = c[k];
            c[k] = temp;
            k++;
          } else if(k < t) {
             k = t;
            c[i] = c[k];
            c[k] = temp;
            k++;
          } else {
            c[i] = c[k];
            c[k] = temp;
            k++;
          }
        }
 
        for(int i = 0; i < n; i++) {
          System.out.print(c[i] + " ");
        }
      }
    }
  }
}