#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 100001

int table[NUM],a[NUM],c[NUM],d[NUM];

int main(){

	int N;
	scanf("%d",&N);

	for(int i = 1; i <= N; i++)table[i] = 0;

	for(int i = 1; i <= N; i++){
		scanf("%d",&a[i]);
		table[a[i]]++;
	}

	int tmp;
	for(int i = 1; i <= N; i++){
		scanf("%d",&tmp);
		table[tmp]--;
	}

	bool FLG = true;

	for(int i = 1; i <= N; i++){
		if(table[i] > 0){
			FLG = false;
			break;
		}
	}

	if(FLG){
		printf("Yes\n");
		return 0;
	}

	for(int i = 1; i <= N; i++){
		if(table[a[i]] <= 0){
			c[i] = a[1];
			d[i] = a[1];
		}else{
			c[i] = a[1];
			d[i] = a[2];
		}
	}

	printf("No\n");
	printf("%d",c[1]);
	for(int i = 2; i <= N; i++)printf(" %d",c[i]);
	printf("\n");

	printf("%d",d[1]);
	for(int i = 2; i <= N; i++)printf(" %d",d[i]);
	printf("\n");

	return 0;
}


### Prompt

Please create a solution in Cpp 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 <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 100001

int table[NUM],a[NUM],c[NUM],d[NUM];

int main(){

	int N;
	scanf("%d",&N);

	for(int i = 1; i <= N; i++)table[i] = 0;

	for(int i = 1; i <= N; i++){
		scanf("%d",&a[i]);
		table[a[i]]++;
	}

	int tmp;
	for(int i = 1; i <= N; i++){
		scanf("%d",&tmp);
		table[tmp]--;
	}

	bool FLG = true;

	for(int i = 1; i <= N; i++){
		if(table[i] > 0){
			FLG = false;
			break;
		}
	}

	if(FLG){
		printf("Yes\n");
		return 0;
	}

	for(int i = 1; i <= N; i++){
		if(table[a[i]] <= 0){
			c[i] = a[1];
			d[i] = a[1];
		}else{
			c[i] = a[1];
			d[i] = a[2];
		}
	}

	printf("No\n");
	printf("%d",c[1]);
	for(int i = 2; i <= N; i++)printf(" %d",c[i]);
	printf("\n");

	printf("%d",d[1]);
	for(int i = 2; i <= N; i++)printf(" %d",d[i]);
	printf("\n");

	return 0;
}


```