#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b[111111];
  int cnt[100001]={};
  int h=0;
  cin>>n;
  for(int i=0;i<n;i++)cin>>b[i];
  for(int i=1;i<=n;i++){
    cin>>a,cnt[a]++;
  }
  for(int i=1;i<=n;i++)if(cnt[i]==0)h=i;
  if(h){
    cout<<"No"<<endl;
    for(int i=1;i<=n;i++){
      if(i-1)cout<<" ";
      cout<<i;
    }
    cout<<endl;
     for(int i=1;i<=n;i++){
      if(i-1)cout<<" ";
      if(b[i-1]==h)cout<<i%n+1;
      else cout<<i;
    }
    cout<<endl;
  }else cout<<"Yes"<<endl;
  return 0;
}


### 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<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b[111111];
  int cnt[100001]={};
  int h=0;
  cin>>n;
  for(int i=0;i<n;i++)cin>>b[i];
  for(int i=1;i<=n;i++){
    cin>>a,cnt[a]++;
  }
  for(int i=1;i<=n;i++)if(cnt[i]==0)h=i;
  if(h){
    cout<<"No"<<endl;
    for(int i=1;i<=n;i++){
      if(i-1)cout<<" ";
      cout<<i;
    }
    cout<<endl;
     for(int i=1;i<=n;i++){
      if(i-1)cout<<" ";
      if(b[i-1]==h)cout<<i%n+1;
      else cout<<i;
    }
    cout<<endl;
  }else cout<<"Yes"<<endl;
  return 0;
}


```