#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
int main(){
	int N;
	cin>>N;
	vector<int> a(N),b(N);
	rep(i,N) cin>>a[i];
	rep(i,N) cin>>b[i];

	set<int> st;
	rep(i,N) st.insert(b[i]);
	rep(I,N) if(!st.count(a[I])){
		puts("No");
		rep(i,N) cout<<a[i]<<(i==N-1?"\n":" ");
		a[I] = a[(I+1)%N];
		rep(i,N) cout<<a[i]<<(i==N-1?"\n":" ");
		return 0;
	}
	puts("Yes");
}


### 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 <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
int main(){
	int N;
	cin>>N;
	vector<int> a(N),b(N);
	rep(i,N) cin>>a[i];
	rep(i,N) cin>>b[i];

	set<int> st;
	rep(i,N) st.insert(b[i]);
	rep(I,N) if(!st.count(a[I])){
		puts("No");
		rep(i,N) cout<<a[i]<<(i==N-1?"\n":" ");
		a[I] = a[(I+1)%N];
		rep(i,N) cout<<a[i]<<(i==N-1?"\n":" ");
		return 0;
	}
	puts("Yes");
}


```