#include<bits/stdc++.h>
using namespace std;
typedef long long ll;


signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
    cout << fixed << setprecision(20);

    int n;
    cin >> n;
    vector<int> A(n), B(n);
    copy_n(istream_iterator<int>(cin), n, A.begin());
    copy_n(istream_iterator<int>(cin), n, B.begin());
    set<int> C;
    for (const auto &b: B)
        C.insert(b);

    int diff = 0;
    vector<int> g, h;
    for (int i = 0; i < n; i++){
        if (C.count(A[i]) == 0){
            cout << "No" << endl;
            for (int j = 0; j < n; j++){
                if (i == j){
                    g.push_back(A[0]);
                    h.push_back(A[1]);
                } else {
                    g.push_back(A[0]);
                    h.push_back(A[0]);
                }
            }
            for (int i = 0; i < n - 1; i++){
                cout << g[i] << " ";
            }
            cout << g[n - 1] << endl;
            for (int i = 0; i < n - 1; i++){
                cout << h[i] << " ";
            }
            cout << h[n - 1] << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}

### Prompt

Please formulate a cpp solution to the following problem:

problem

AOR Ika made a set $ S = \\ {a_1, ..., a_N \\} $ and a map $ f: S → S $. $ f (a_i) = b_i $. For any element $ x $ in the set $ S $, all maps $ g, h: S → S $ satisfying $ g (f (x)) = h (f (x)) $ are $ g (x). ) = Determine if h (x) $ is satisfied, and if not, configure one counterexample.





Example

Input

5
1 2 3 4 5
3 4 2 5 1


Output

Yes

### Response

```cpp
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;


signed main(){
    ios::sync_with_stdio(false);
	cin.tie(0);
    cout << fixed << setprecision(20);

    int n;
    cin >> n;
    vector<int> A(n), B(n);
    copy_n(istream_iterator<int>(cin), n, A.begin());
    copy_n(istream_iterator<int>(cin), n, B.begin());
    set<int> C;
    for (const auto &b: B)
        C.insert(b);

    int diff = 0;
    vector<int> g, h;
    for (int i = 0; i < n; i++){
        if (C.count(A[i]) == 0){
            cout << "No" << endl;
            for (int j = 0; j < n; j++){
                if (i == j){
                    g.push_back(A[0]);
                    h.push_back(A[1]);
                } else {
                    g.push_back(A[0]);
                    h.push_back(A[0]);
                }
            }
            for (int i = 0; i < n - 1; i++){
                cout << g[i] << " ";
            }
            cout << g[n - 1] << endl;
            for (int i = 0; i < n - 1; i++){
                cout << h[i] << " ";
            }
            cout << h[n - 1] << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}

```