#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int ex[100005];
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;cin>>N;
  set<int> S;
  FOR(i,1,N+1)S.insert(i);
  int a[N+1],b;
  FOR(i,1,N+1)cin>>a[i];
  FOR(i,1,N+1){
    cin>>b;
    S.erase(b);
  }
  if(S.empty()){
    cout<<"Yes"<<endl;
    return 0;
  }
  cout<<"No"<<endl;
  FOR(i,0,N){
    if(i)cout<<" ";
    cout<<1;
  }
  cout<<endl;
  FOR(i,1,N+1){
    if(i-1)cout<<" ";
    if(S.count(a[i])){
      cout<<2;
    }else{
      cout<<1;
    }
  }
  cout<<endl;
  return 0;
}

### Prompt

Your challenge is to write 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 <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;
int ex[100005];
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;cin>>N;
  set<int> S;
  FOR(i,1,N+1)S.insert(i);
  int a[N+1],b;
  FOR(i,1,N+1)cin>>a[i];
  FOR(i,1,N+1){
    cin>>b;
    S.erase(b);
  }
  if(S.empty()){
    cout<<"Yes"<<endl;
    return 0;
  }
  cout<<"No"<<endl;
  FOR(i,0,N){
    if(i)cout<<" ";
    cout<<1;
  }
  cout<<endl;
  FOR(i,1,N+1){
    if(i-1)cout<<" ";
    if(S.count(a[i])){
      cout<<2;
    }else{
      cout<<1;
    }
  }
  cout<<endl;
  return 0;
}

```