// header {{{
#include <bits/stdc++.h>
using namespace std;

// {U}{INT,LONG,LLONG}_{MAX,MIN}
#define INF         INT_MAX/3
#define LLINF       LLONG_MAX/3
#define MOD         (1000000007LL)
#define MODA(a, b)  a=((a)+(b))%MOD
#define MODP(a, b)  a=((a)*(b))%MOD
#define inc(i, l, r)   for(int i=(l);i<(r);i++)
#define dec(i, l, r)   for(int i=(r)-1;i>=(l);i--)
#define pb          push_back
#define se          second
#define fi          first
#define mset(a, b)  memset(a, b, sizeof(a))

using LL  = long long;
using G   = vector<vector<int>>;

int di[] = {0, -1, 0, 1};
int dj[] = {1, 0, -1, 0};
// }}}

int main() {
    cin.tie(0);ios::sync_with_stdio(false);

    int n;cin >> n;
    vector<int> a(n), b(n);
    vector<bool> exist(n+1, false);
    string ans = "Yes";
    for(int i=0;i<n;i++) cin >> a[i];
    for(int i=0;i<n;i++){
        cin >> b[i];
        if(exist[b[i]]) ans = "No";
        exist[b[i]] = true;
    }

    cout << ans << endl;
    if(ans == "No"){
        for(int i=0;i<n;i++){
            cout << a[0];
            if(i != n-1){
                cout << " ";
            }
        }
        cout << endl;

        for(int i=0;i<n;i++){
            if(exist[a[i]]){
                cout << a[0];
            }else{
                cout << a[1];
            }
            if(i != n-1){
                cout << " ";
            }
        }
        cout << endl;
    }

    return 0;
}


### Prompt

Your challenge is to write 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
// header {{{
#include <bits/stdc++.h>
using namespace std;

// {U}{INT,LONG,LLONG}_{MAX,MIN}
#define INF         INT_MAX/3
#define LLINF       LLONG_MAX/3
#define MOD         (1000000007LL)
#define MODA(a, b)  a=((a)+(b))%MOD
#define MODP(a, b)  a=((a)*(b))%MOD
#define inc(i, l, r)   for(int i=(l);i<(r);i++)
#define dec(i, l, r)   for(int i=(r)-1;i>=(l);i--)
#define pb          push_back
#define se          second
#define fi          first
#define mset(a, b)  memset(a, b, sizeof(a))

using LL  = long long;
using G   = vector<vector<int>>;

int di[] = {0, -1, 0, 1};
int dj[] = {1, 0, -1, 0};
// }}}

int main() {
    cin.tie(0);ios::sync_with_stdio(false);

    int n;cin >> n;
    vector<int> a(n), b(n);
    vector<bool> exist(n+1, false);
    string ans = "Yes";
    for(int i=0;i<n;i++) cin >> a[i];
    for(int i=0;i<n;i++){
        cin >> b[i];
        if(exist[b[i]]) ans = "No";
        exist[b[i]] = true;
    }

    cout << ans << endl;
    if(ans == "No"){
        for(int i=0;i<n;i++){
            cout << a[0];
            if(i != n-1){
                cout << " ";
            }
        }
        cout << endl;

        for(int i=0;i<n;i++){
            if(exist[a[i]]){
                cout << a[0];
            }else{
                cout << a[1];
            }
            if(i != n-1){
                cout << " ";
            }
        }
        cout << endl;
    }

    return 0;
}


```