/*  -*- coding: utf-8 -*-
 *
 * 2875.cc: Mapping
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 100000;

/* typedef */

typedef vector<int> vi;
typedef queue<int> qi;
typedef pair<int,int> pii;

/* global variables */

int as[MAX_N], bs[MAX_N];
bool used[MAX_N];

/* subroutines */

void printfunc(int n, int v) {
  for (int i = 0; i < n; i++) {
    if (i) putchar(' ');
    printf("%d", used[as[i]] ? as[i] + 1 : v);
  }
  putchar('\n');
}

/* main */

int main() {
  int n;
  scanf("%d", &n);

  for (int i = 0; i < n; i++) scanf("%d", as + i), as[i]--;
  for (int i = 0; i < n; i++) scanf("%d", bs + i), bs[i]--, used[bs[i]] = true;

  int un = 0;
  for (int i = 0; i < n; i++) un += used[i];

  if (un == n) puts("Yes");
  else {
    puts("No");
    printfunc(n, 1);
    printfunc(n, 2);
  }
  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
/*  -*- coding: utf-8 -*-
 *
 * 2875.cc: Mapping
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 100000;

/* typedef */

typedef vector<int> vi;
typedef queue<int> qi;
typedef pair<int,int> pii;

/* global variables */

int as[MAX_N], bs[MAX_N];
bool used[MAX_N];

/* subroutines */

void printfunc(int n, int v) {
  for (int i = 0; i < n; i++) {
    if (i) putchar(' ');
    printf("%d", used[as[i]] ? as[i] + 1 : v);
  }
  putchar('\n');
}

/* main */

int main() {
  int n;
  scanf("%d", &n);

  for (int i = 0; i < n; i++) scanf("%d", as + i), as[i]--;
  for (int i = 0; i < n; i++) scanf("%d", bs + i), bs[i]--, used[bs[i]] = true;

  int un = 0;
  for (int i = 0; i < n; i++) un += used[i];

  if (un == n) puts("Yes");
  else {
    puts("No");
    printfunc(n, 1);
    printfunc(n, 2);
  }
  return 0;
}


```