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 JAVA):

Solution:

import java.util.Scanner;

/**
 * Created by enpingkuang on 2020/9/19 4:15 下午
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] a = new int[200005];
        int[] b = new int[200005];
        int left = -1,right = -1;
        int flag = -1;
        for(int i = 0;i<n;i++){
            a[i] = scanner.nextInt();
        }
        for(int i = n-1;i>=0;i--){
            b[i] = scanner.nextInt();
            if(b[i] == a[i]){
                if(right == -1){
                    right = i;
                    flag = b[i];
                }
                left = i;
            }
        }
        int[] indexArray = new int[200005];
        int index = 0;
        for(int i = 0;i<n;i++){
            if(i == left){
                i = right;
                continue;
            }
            if(b[i] != flag && a[i] != flag){
                indexArray[index++] = i;
            }
        }
        if(left == -1 || index >= (right - left +1)){
            System.out.println("Yes");
            index = 0;
            for(int i = left;i<= right;i++){
                if (i == -1){
                    break;
                }
                int tmp = b[i];
                b[i] = b[indexArray[index]];
                b[indexArray[index]] = tmp;
                index++;
            }
            for(int i = 0;i<n;i++){
                if(i != 0) System.out.print(" ");
                System.out.print(b[i]);
            }
            System.out.println();
        }else{
            System.out.println("No");
        }

    }
}