#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define pp pair<ll,ll>
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=998244353;
int inf=1000001000;
ll INF=1e18+5;
ll mod=INF;


int main() {
    int n;
    cin >> n;
    vector<int> a(n),b(n);
    rep(i,n) cin >> a[i];
    rep(i,n) cin >> b[i];
    vector<int> c(n,0);
    rep(i,n){
        c[b[i]-1]=1;
    }
    bool t=true;
    rep(i,n){
        if (c[i]==0) t=false;
    }
    if (t){
        cout << "Yes" << endl;
        return 0;
    }
    vector<int> u(n),y(n);
    cout << "No" << endl;
    rep(i,n){
        if (c[a[i]-1]==1){
            u[i]=1;
            y[i]=1;
        }
        else{
            u[i]=1;
            y[i]=2;
        }
    }
    rep(i,n-1) cout << u[i] << " ";
    cout << u[n-1] << endl;
    rep(i,n-1) cout << y[i] << " ";
    cout << y[n-1] << endl;
}


### Prompt

In CPP, your task is to solve 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;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define pp pair<ll,ll>
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=998244353;
int inf=1000001000;
ll INF=1e18+5;
ll mod=INF;


int main() {
    int n;
    cin >> n;
    vector<int> a(n),b(n);
    rep(i,n) cin >> a[i];
    rep(i,n) cin >> b[i];
    vector<int> c(n,0);
    rep(i,n){
        c[b[i]-1]=1;
    }
    bool t=true;
    rep(i,n){
        if (c[i]==0) t=false;
    }
    if (t){
        cout << "Yes" << endl;
        return 0;
    }
    vector<int> u(n),y(n);
    cout << "No" << endl;
    rep(i,n){
        if (c[a[i]-1]==1){
            u[i]=1;
            y[i]=1;
        }
        else{
            u[i]=1;
            y[i]=2;
        }
    }
    rep(i,n-1) cout << u[i] << " ";
    cout << u[n-1] << endl;
    rep(i,n-1) cout << y[i] << " ";
    cout << y[n-1] << endl;
}


```