#include <bits/stdc++.h>
using namespace std;

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)
#define PI 3.14159265358979323846

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

//-----------------------------------------------------------------------------

int n,a[100000],b[100000];
bool used[100100],flg=true;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin>>n;
	REP(i,n) {
		cin>>a[i];
	}
	REP(i,n) {
		cin>>b[i];
	}
	REP(i,n) {
		if(used[b[i]]==false) used[b[i]]=true;
		else flg=false;
	}

	if(flg) {
		cout<<"Yes"<<endl;
		return 0;
	}

	cout<<"No"<<endl;

	REP(i,n) cout<<1<<(i==n-1?'\n':' ');
	REP(i,n) cout<<(used[a[i]]?1:2)<<(i==n-1?'\n':' ');
}


### 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 INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)
#define PI 3.14159265358979323846

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

//-----------------------------------------------------------------------------

int n,a[100000],b[100000];
bool used[100100],flg=true;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin>>n;
	REP(i,n) {
		cin>>a[i];
	}
	REP(i,n) {
		cin>>b[i];
	}
	REP(i,n) {
		if(used[b[i]]==false) used[b[i]]=true;
		else flg=false;
	}

	if(flg) {
		cout<<"Yes"<<endl;
		return 0;
	}

	cout<<"No"<<endl;

	REP(i,n) cout<<1<<(i==n-1?'\n':' ');
	REP(i,n) cout<<(used[a[i]]?1:2)<<(i==n-1?'\n':' ');
}


```