#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<bitset>
#include<random>
#include<time.h>
#define INF 1000000000ll
#define MOD 1000000007ll
#define EPS 1e-10
#define REP(i,m) for(long long i=0; i<(ll)m; i++)
#define FOR(i,n,m) for(long long i=n; i<(ll)m; i++)
#define DUMP(a) for(long long dump=0; dump<(ll)a.size(); dump++) { cout<<a[dump]; if(dump!=(ll)a.size()-1) cout<<" "; else cout<<endl; }
#define ALL(v) v.begin(),v.end()
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef long double ld;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n;
	cin>>n;
	vector<ll> a(n);
	vector<ll> b(n);
	REP(i,n) cin>>a[i];
	REP(i,n) cin>>b[i];
	set<ll>  s;
	REP(i,n) s.insert(b[i]);
	if((ll)s.size()==n) cout<<"Yes"<<endl;
	else {
		cout<<"No"<<endl;
		REP(i,n) {
			if(s.count(i+1)==0) {
				REP(j,n) {
					if(a[j]!=i+1) cout<<1;
					else cout<<n-1;
					if(j==n-1) cout<<endl;
					else cout<<" ";
				}
				REP(j,n) {
					if(a[j]!=i+1) cout<<1;
					else cout<<n;
					if(j==n-1) cout<<endl;
					else cout<<" ";
				}
				return 0;
			}
		}
	}
}


### 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<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<bitset>
#include<random>
#include<time.h>
#define INF 1000000000ll
#define MOD 1000000007ll
#define EPS 1e-10
#define REP(i,m) for(long long i=0; i<(ll)m; i++)
#define FOR(i,n,m) for(long long i=n; i<(ll)m; i++)
#define DUMP(a) for(long long dump=0; dump<(ll)a.size(); dump++) { cout<<a[dump]; if(dump!=(ll)a.size()-1) cout<<" "; else cout<<endl; }
#define ALL(v) v.begin(),v.end()
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef long double ld;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n;
	cin>>n;
	vector<ll> a(n);
	vector<ll> b(n);
	REP(i,n) cin>>a[i];
	REP(i,n) cin>>b[i];
	set<ll>  s;
	REP(i,n) s.insert(b[i]);
	if((ll)s.size()==n) cout<<"Yes"<<endl;
	else {
		cout<<"No"<<endl;
		REP(i,n) {
			if(s.count(i+1)==0) {
				REP(j,n) {
					if(a[j]!=i+1) cout<<1;
					else cout<<n-1;
					if(j==n-1) cout<<endl;
					else cout<<" ";
				}
				REP(j,n) {
					if(a[j]!=i+1) cout<<1;
					else cout<<n;
					if(j==n-1) cout<<endl;
					else cout<<" ";
				}
				return 0;
			}
		}
	}
}


```