When Masha came to math classes today, she saw two integer sequences of length n - 1 on the blackboard. Let's denote the elements of the first sequence as a_i (0 ≤ a_i ≤ 3), and the elements of the second sequence as b_i (0 ≤ b_i ≤ 3).

Masha became interested if or not there is an integer sequence of length n, which elements we will denote as t_i (0 ≤ t_i ≤ 3), so that for every i (1 ≤ i ≤ n - 1) the following is true: 

  * a_i = t_i | t_{i + 1} (where | denotes the [bitwise OR operation](https://en.wikipedia.org/wiki/Bitwise_operation#OR)) and 
  * b_i = t_i \& t_{i + 1} (where \& denotes the [bitwise AND operation](https://en.wikipedia.org/wiki/Bitwise_operation#AND)). 



The question appeared to be too difficult for Masha, so now she asked you to check whether such a sequence t_i of length n exists. If it exists, find such a sequence. If there are multiple such sequences, find any of them.

Input

The first line contains a single integer n (2 ≤ n ≤ 10^5) — the length of the sequence t_i. 

The second line contains n - 1 integers a_1, a_2, …, a_{n-1} (0 ≤ a_i ≤ 3) — the first sequence on the blackboard.

The third line contains n - 1 integers b_1, b_2, …, b_{n-1} (0 ≤ b_i ≤ 3) — the second sequence on the blackboard.

Output

In the first line print "YES" (without quotes), if there is a sequence t_i that satisfies the conditions from the statements, and "NO" (without quotes), if there is no such sequence.

If there is such a sequence, on the second line print n integers t_1, t_2, …, t_n (0 ≤ t_i ≤ 3) — the sequence that satisfies the statements conditions.

If there are multiple answers, print any of them.

Examples

Input

4
3 3 2
1 2 0


Output

YES
1 3 2 0 

Input

3
1 3
3 2


Output

NO

Note

In the first example it's easy to see that the sequence from output satisfies the given conditions: 

  * t_1 | t_2 = (01_2) | (11_2) = (11_2) = 3 = a_1 and t_1 \& t_2 = (01_2) \& (11_2) = (01_2) = 1 = b_1; 
  * t_2 | t_3 = (11_2) | (10_2) = (11_2) = 3 = a_2 and t_2 \& t_3 = (11_2) \& (10_2) = (10_2) = 2 = b_2; 
  * t_3 | t_4 = (10_2) | (00_2) = (10_2) = 2 = a_3 and t_3 \& t_4 = (10_2) \& (00_2) = (00_2) = 0 = b_3. 



In the second example there is no such sequence.
#include<bits/stdc++.h> 
using namespace std; 

//to insert pair use eb or { }
#define int int64_t
typedef pair<int,int> pii;
const int X=1e9+7; 
const int inf=1e18;

#define lld        int
#define pqu        priority_queue
#define eb         emplace_back
#define mp         make_pair
#define fi         first
#define se         second
#define pb         push_back
#define endl       "\n"
#define v          vector
#define Y          998244353
#define EPS        1e-6
#define N          500005
#define pi         3.1415926535897932384626

#define ones(x)     __builtin_popcount(x)
#define zero(a)    memset(a,0,sizeof(a))
#define minus(a)   memset(a,-1,sizeof(a))
#define all(a)     (a).begin(),(a).end()

#define rec(i,s,e)   for(int i=s ; (s<=e)?(i<e):(i>=e) ; (s<=e)?(i++):(i--) )
//for flush dont use endl (\n)

//lower_bound - returns first element such that a[i]>=x
// - create an array of n+1 size with first element 0  

// upper bound - returns first element such that a[i]>x
// - returns in 0 based indexing - if no such elemnt exists return n (both upper and lower)
void google(int i)
{  cout<<"Case #"<<i<<": "; }

//  sorting strings sort(s.begin(),s.end());

//, is an operator and returns its rightmost statement value ,e.g. if A and B be statements (A,B) == B

//floor() for low 
//ceil() for above 
// trunc() removes decimal digits
//round() used to round off 
void prec(double n,int d) 
{ 
 cout<<fixed<<setprecision(d)<<n<<endl; 
}

//prime[i]==1 if it is prime 
int prime[1000001]; 
void sieve(int n) 
{ rec(i,0,n+1) 
    prime[i]=1; 
   for(int i=2;i*i<=n;i++) 
     { if(prime[i]!=1) 
          continue; 
         for(int j=i*i;j<=n;j=j+i) 
          if(prime[j]==1)
           prime[j]=i; 
      }
}

// gcd
int gcd(int a,int b)
{
    if(a==0)
     return b; 
    return gcd(b%a,a); 
}

//fermat a^(m-2)%mod
int bin(int a,int n,int m)
{  int res=1; 
 while(n) 
  { if(n%2) 
      { res=(res*a)%m; 
         n--; 
      } 
     a=(a*a)%m; 
     n/=2; 
  }
  return res; 
}

// factorial
lld fact[1000001];
void precompute(lld n)
{
    fact[0]=1;
    rec(i,1,n+1)
      fact[i]=(fact[i-1]*i)%X;
}

// combinatorics
lld ncr(lld n,lld r)
{
    if(r==0)
     return 1;
    else if(r>n)
     return 0;
    else
     return ( (fact[n]*bin(fact[r],X-2,X))%X * bin(fact[n-r],X-2,X) )%X;
}

void dijktra(v<pii> g[], int n)
{
	pqu<pii, v<pii>, greater<pii>> pq;
	v<int> dist(n, inf);
	dist[0] = 0;
	int parent[n];
	minus(parent); 
	pq.push({0, 0});

	while (!pq.empty())
	{
		pii x= pq.top();
		pq.pop();

		rec(i,0,(int)g[x.se].size())
		{
			pii k = g[x.se][i];
			if (dist[x.se] + k.fi < dist[k.se])
			{
				dist[k.se] = dist[x.se] + k.fi;
				parent[k.se] = x.se;
				pq.push({dist[k.se], k.se});
			}
		}
	}
}

void bfs(int s,v<int> g[],int n)
{ 
   bool vis[n]; 
   rec(i,0,n) 
    vis[i]=false; 
    
   vis[s]=true; 
   deque<int> q; 
   q.pb(s); 
   
   while(!q.empty()) 
   {  
      s=q.front(); 
     q.pop_front(); 
      
     for(int i=0;i<(int)g[s].size();i++) 
      {  
        if(!vis[g[s][i]])
         { vis[g[s][i]]=true; 
            q.pb(g[s][i]); 
         }
      }
   }
}

void dfs(int u,v<int> g[],bool *vis)
{ 

   vis[u]=true; 
   for(int i=0;i<(int)g[u].size();i++) 
     if(!vis[g[u][i]])
          dfs(g[u][i],g,vis); 
       
} 
void create_w(v<pii> *g ,int m)
{
	rec(i,0, m)
	{
		int u,v,w;
		cin>>u>>v>>w;
		g[u-1].pb({w, v-1});
		g[v-1].pb({w, u-1});
	}
}
void create(v<int> *g,int m) 
{  
   rec(i,0,m) 
    {
       int u,v; 
       cin>>u>>v; 
       g[u-1].pb(v-1); 
       g[v-1].pb(u-1); 
    } 
}


void contest(int t)
{
    int n;
    cin>>n;
    
    lld a[n],b[n],ans[n]={};
    
    rec(i,0,n-1)
     cin>>a[i];
    
    rec(i,0,n-1)
     cin>>b[i];
     
    rec(i,0,n-1)
    {
        ans[i]|=b[i];
        ans[i+1]|=b[i];
    }
    
    rec(i,0,n-1)
    {
        lld x =ans[i]|ans[i+1];
        if(x==a[i])
         continue;
        if((x&1) && (ans[i]&1==0))
         ans[i]+=1;
        if((x&2) && (ans[i]&2==0))
         ans[i]+=2;
    }
    
    rec(i,0,n-1)
    {
        if( (ans[i]&ans[i+1])==b[i] && (ans[i]|ans[i+1])==a[i])
         continue;
        
        cout<<"NO"<<endl;
        return;
    }
    cout<<"YES"<<endl;
    rec(i,0,n)
     cout<<ans[i]<<" ";
    cout<<endl; 
}

int32_t main()
{   
    ios_base::sync_with_stdio(false); 
    cin.tie(0); cout.tie(0);
    
    #ifdef PUNEET_GOEL
      //freopen("input.txt", "r", stdin);
      //freopen("output.txt", "w", stdout);
    #endif
    
    //sieve(1e6); 
    //precompute(1e6);
    int T=1; 
    //cin>>T;
    rec(t,0,T) 
    {
      contest(t); 
    }
	return 0;
}