#include <iostream>
#include <vector>
#include <set>
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (int &x : a) cin >> x;
  for (int &x : b) cin >> x;
  set<int> s(b.begin(), b.end());
  if (s.size() == n) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
  rep(i, n) cout << a[0] << " \n"[i == n - 1];
  rep(i, n) cout << (s.count(a[i]) ? a[0] : a[1]) << " \n"[i == n - 1];
}

### Prompt

Create a solution in Cpp for 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 <vector>
#include <set>
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  for (int &x : a) cin >> x;
  for (int &x : b) cin >> x;
  set<int> s(b.begin(), b.end());
  if (s.size() == n) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
  rep(i, n) cout << a[0] << " \n"[i == n - 1];
  rep(i, n) cout << (s.count(a[i]) ? a[0] : a[1]) << " \n"[i == n - 1];
}

```