#include <iostream>
#include <fstream>
#include <string> 
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>

#define BIT(a) (1 << (a))

using namespace std;

long long MOD = 1000000007;


long long mod_pow(long long x, long long n){
    long long res = 1;
    for(int i = 0;i < 60; i++){
        if(n >> i & 1) res = res * x % MOD;
        x = x * x % MOD;
    }
    return res;
}

int a[100005];
int b[100005];

int main(void){
	int N;
	cin >> N;
	for (int i = 0; i < N; i++){
		cin >> a[i];
	}
	for (int i = 0; i < N; i++){
		int x;
		cin >> x;
		b[x]++;
	}
	int flag = 0;
	for (int i = 0; i < N; i++){
		if (!b[a[i]]){
			flag = 1;
		}
	}
	if (flag){
		cout << "No" << endl;
		for (int i = 0; i < N; i++){
			if (i) cout << " ";
			cout << 1;
		}
		cout << endl;
		for (int i = 0; i < N; i++){
			if (i) cout << " ";
			if (!b[a[i]]){
				cout << 2;
			}else{
				cout << 1;
			}
		}
		cout << endl;
	}else{
		cout << "Yes" << endl;
	}
	return 0;
}



### Prompt

Please provide a Cpp coded solution to the problem described below:

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 <iostream>
#include <fstream>
#include <string> 
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>

#define BIT(a) (1 << (a))

using namespace std;

long long MOD = 1000000007;


long long mod_pow(long long x, long long n){
    long long res = 1;
    for(int i = 0;i < 60; i++){
        if(n >> i & 1) res = res * x % MOD;
        x = x * x % MOD;
    }
    return res;
}

int a[100005];
int b[100005];

int main(void){
	int N;
	cin >> N;
	for (int i = 0; i < N; i++){
		cin >> a[i];
	}
	for (int i = 0; i < N; i++){
		int x;
		cin >> x;
		b[x]++;
	}
	int flag = 0;
	for (int i = 0; i < N; i++){
		if (!b[a[i]]){
			flag = 1;
		}
	}
	if (flag){
		cout << "No" << endl;
		for (int i = 0; i < N; i++){
			if (i) cout << " ";
			cout << 1;
		}
		cout << endl;
		for (int i = 0; i < N; i++){
			if (i) cout << " ";
			if (!b[a[i]]){
				cout << 2;
			}else{
				cout << 1;
			}
		}
		cout << endl;
	}else{
		cout << "Yes" << endl;
	}
	return 0;
}



```