// {{{
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
// }}}

using ll = long long;

int N, a[101010], b[101010];

int main() {
    cin >> N;
    for (int j = 0; j < N; ++j) { cin >> a[j]; }
    for (int j = 0; j < N; ++j) { cin >> b[j]; }

    bool ok = true;
    int c[101010];
    fill(c, c+N+1, 0);
    for (int j = 0; j < N; ++j) {
        if (c[b[j]] == 0) {
            c[b[j]] ++;
        } else {
            ok = false;
        }
    }

    if (ok) { cout << "Yes" << endl; return 0; }

    cout << "No" << endl;

    for (int j = 0; j < N; ++j) {
        if (j > 0) cout << " ";
        cout << 1;
    }
    cout << endl;
    for (int j = 0; j < N; ++j) {
        if (j > 0) cout << " ";
        cout << (c[a[j]] > 0 ? 1 : 2);
    }
    cout << endl;
    return 0;
}


### Prompt

Construct a Cpp code solution to the problem outlined:

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 <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
// }}}

using ll = long long;

int N, a[101010], b[101010];

int main() {
    cin >> N;
    for (int j = 0; j < N; ++j) { cin >> a[j]; }
    for (int j = 0; j < N; ++j) { cin >> b[j]; }

    bool ok = true;
    int c[101010];
    fill(c, c+N+1, 0);
    for (int j = 0; j < N; ++j) {
        if (c[b[j]] == 0) {
            c[b[j]] ++;
        } else {
            ok = false;
        }
    }

    if (ok) { cout << "Yes" << endl; return 0; }

    cout << "No" << endl;

    for (int j = 0; j < N; ++j) {
        if (j > 0) cout << " ";
        cout << 1;
    }
    cout << endl;
    for (int j = 0; j < N; ++j) {
        if (j > 0) cout << " ";
        cout << (c[a[j]] > 0 ? 1 : 2);
    }
    cout << endl;
    return 0;
}


```