#include <bits/stdc++.h>

using namespace std;

#define int long long
#define all(v) (v).begin(), (v).end()
#define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__)
#define reps(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) reps(i, 0, n)

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

using Pi = pair<int, int>;
using Tapris = tuple<int, int, int>;
using vint = vector<int>;

const int inf = 1LL << 55;
const int mod = 1e9 + 7;

signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  int n;
  cin >> n;
  vint a(n), b(n);
  rep(i, n) cin >> a[i];
  vector<bool> used(n, false);
  bool flag = true;
  rep(i, n) {
    cin >> b[i];
    if(!used[b[i]-1]) used[b[i]-1] = true;
    else flag = false;
  }
  if(flag) cout << "Yes" << endl;
  else {
    cout << "No" << endl;
    rep(i, n) cout << (used[a[i]-1] ? i+1 : 1) << " \n"[i==n-1];
    rep(i, n) cout << (used[a[i]-1] ? i+1 : 2) << " \n"[i==n-1];
  }

  return 0;
}


### 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>

using namespace std;

#define int long long
#define all(v) (v).begin(), (v).end()
#define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__)
#define reps(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) reps(i, 0, n)

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

using Pi = pair<int, int>;
using Tapris = tuple<int, int, int>;
using vint = vector<int>;

const int inf = 1LL << 55;
const int mod = 1e9 + 7;

signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  int n;
  cin >> n;
  vint a(n), b(n);
  rep(i, n) cin >> a[i];
  vector<bool> used(n, false);
  bool flag = true;
  rep(i, n) {
    cin >> b[i];
    if(!used[b[i]-1]) used[b[i]-1] = true;
    else flag = false;
  }
  if(flag) cout << "Yes" << endl;
  else {
    cout << "No" << endl;
    rep(i, n) cout << (used[a[i]-1] ? i+1 : 1) << " \n"[i==n-1];
    rep(i, n) cout << (used[a[i]-1] ? i+1 : 2) << " \n"[i==n-1];
  }

  return 0;
}


```