#include <bits/stdc++.h>

using namespace std;

#define DBG cerr << '!' << endl;
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(10)
#define INF 1000000000
#define MOD 1000000007

typedef long long ll;
typedef pair<ll,ll> P;

bool used[111111];

int main()
{
	int n;cin >> n;
	vector<int> A(n);
	vector<int> B(n);
	
	REP(i,n){
		cin >> A[i];
		A[i]--;
	}
	REP(i,n){
		cin >> B[i];
		B[i]--;
		used[B[i]] = true;
	}
	
	bool flag = true;
	REP(i,n){
		if(!used[i])flag = false;
	}
	
	if(flag){
		cout << "Yes" << endl;
	}
	
	else{
		cout << "No" << endl;
		REP(i,n){
			cout << 1;
			if(i != n-1)cout << ' ' ;
		}cout << endl;
		REP(i,n){
			if(used[A[i]]){
				cout << 1;
			}
			else{
				cout << 2;
			}
			if(i != n-1)cout << ' ';
		}cout << endl;
	}
	
	return 0;
}

### Prompt

Create a solution in CPP for 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 DBG cerr << '!' << endl;
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {for(int aaa = 0;aaa < i;aaa++){for(int bbb = 0;bbb < j;bbb++)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(10)
#define INF 1000000000
#define MOD 1000000007

typedef long long ll;
typedef pair<ll,ll> P;

bool used[111111];

int main()
{
	int n;cin >> n;
	vector<int> A(n);
	vector<int> B(n);
	
	REP(i,n){
		cin >> A[i];
		A[i]--;
	}
	REP(i,n){
		cin >> B[i];
		B[i]--;
		used[B[i]] = true;
	}
	
	bool flag = true;
	REP(i,n){
		if(!used[i])flag = false;
	}
	
	if(flag){
		cout << "Yes" << endl;
	}
	
	else{
		cout << "No" << endl;
		REP(i,n){
			cout << 1;
			if(i != n-1)cout << ' ' ;
		}cout << endl;
		REP(i,n){
			if(used[A[i]]){
				cout << 1;
			}
			else{
				cout << 2;
			}
			if(i != n-1)cout << ' ';
		}cout << endl;
	}
	
	return 0;
}

```