#include<bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
int W,H;
bool inrange(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
#define MP make_pair
signed main(){
    int n; cin>>n;
    vector<int>vvataarne(n); rep(i,n)cin>>vvataarne[i];
    vector<int>kitikuyarou(n); rep(i,n)cin>>kitikuyarou[i];
    set<int>vvhaAORIkaiwanotourist;
    rep(i,n)vvhaAORIkaiwanotourist.insert(kitikuyarou[i]);
    if(vvhaAORIkaiwanotourist.size()==n)return puts("Yes")*0;
    map<int,int>vvhasinntyokukaiwainotourist;
    rep(i,n)vvhasinntyokukaiwainotourist[kitikuyarou[i]]++;
    int safe=INF;
    puts("No");
    rep(i,n){
        if(i)cout<<" ";
        cout<<kitikuyarou[i];
    }
    cout<<endl;
    rep(i,n){
        if(i)cout<<" ";
        if(vvhasinntyokukaiwainotourist[vvataarne[i]])cout<<kitikuyarou[i];
        else cout<<vvataarne[i];
    }
    cout<<endl;
}


### Prompt

Your task is to create 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>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld =long double;
#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
int W,H;
bool inrange(int x,int y){return (0<=x&&x<W)&&(0<=y&&y<H);}
using namespace std;
typedef pair<int, int> pii;
typedef pair<int,pii> piii;
#define MP make_pair
signed main(){
    int n; cin>>n;
    vector<int>vvataarne(n); rep(i,n)cin>>vvataarne[i];
    vector<int>kitikuyarou(n); rep(i,n)cin>>kitikuyarou[i];
    set<int>vvhaAORIkaiwanotourist;
    rep(i,n)vvhaAORIkaiwanotourist.insert(kitikuyarou[i]);
    if(vvhaAORIkaiwanotourist.size()==n)return puts("Yes")*0;
    map<int,int>vvhasinntyokukaiwainotourist;
    rep(i,n)vvhasinntyokukaiwainotourist[kitikuyarou[i]]++;
    int safe=INF;
    puts("No");
    rep(i,n){
        if(i)cout<<" ";
        cout<<kitikuyarou[i];
    }
    cout<<endl;
    rep(i,n){
        if(i)cout<<" ";
        if(vvhasinntyokukaiwainotourist[vvataarne[i]])cout<<kitikuyarou[i];
        else cout<<vvataarne[i];
    }
    cout<<endl;
}


```