
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <array>
#include <cassert>
#include <bitset>
using namespace std;
using LL = long long;

int N;
vector<int>A, B;
map<int, int>mp;

int main(void)
{
	cin >> N;
	for (int i = 0; i < N; ++i) {
		int tmp; cin >> tmp;
		A.push_back(tmp);
		mp[tmp]++;
	}
	for (int i = 0; i < N; ++i) {
		int tmp; cin >> tmp;
		B.push_back(tmp);
		mp[tmp]--;
	}
	for (auto p : mp) {
		if (p.second > 0) {
			cout << "No" << endl;
			for (int i = 0; i < N; ++i) {
				cout << A[i] << " \n"[i == N - 1];
			}
			for (int i = 0; i < N; ++i) {
				if (A[i] == p.first)A[i] = A[(i + 1) % N];
				cout << A[i] << " \n"[i == N - 1];
			}
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}


### Prompt

Generate 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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_set>
#include <unordered_map>
#include <array>
#include <cassert>
#include <bitset>
using namespace std;
using LL = long long;

int N;
vector<int>A, B;
map<int, int>mp;

int main(void)
{
	cin >> N;
	for (int i = 0; i < N; ++i) {
		int tmp; cin >> tmp;
		A.push_back(tmp);
		mp[tmp]++;
	}
	for (int i = 0; i < N; ++i) {
		int tmp; cin >> tmp;
		B.push_back(tmp);
		mp[tmp]--;
	}
	for (auto p : mp) {
		if (p.second > 0) {
			cout << "No" << endl;
			for (int i = 0; i < N; ++i) {
				cout << A[i] << " \n"[i == N - 1];
			}
			for (int i = 0; i < N; ++i) {
				if (A[i] == p.first)A[i] = A[(i + 1) % N];
				cout << A[i] << " \n"[i == N - 1];
			}
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}


```