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.
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>

#ifndef ONLINE_JUDGE
    #define DEBUG
#endif

#ifdef DEBUG
    #define IFD(...) __VA_ARGS__
    #define IFN(...)
    #define L cout<<__LINE__<<"\n";
    #define PRINT(...) __VA_ARGS__ cout<<__LINE__<<" : "<<#__VA_ARGS__<<"\n"
    #define PRT(x) cout<<__LINE__<<" : "<<#x<<" = "<<x<<"\n"
#else // DEBUG
    #define IFD(...)
    #define IFN(...) __VA_ARGS__
    #define L
    #define PRINT(...) __VA_ARGS__
    #define PRT(x)
#endif // DEBUG

#define it iterator
#define rit reverse_iterator
#define mp make_pair
#define mems(a,b) memset(a,b,sizeof(a))
#define mem0(a) mems(a,0)
#define mem1(a) mems(a,1)
#define mem255(a) mems(a,255)
#define all(c) begin(c) , end(c)
#define sz(c) ((long long)((c).size()))
#define phb push_back
#define ppb pop_back
#define phf push_front
#define ppf pop_front
#define fort0(i,a,b) for(ll i=a,i##_TO=b;i<i##_TO;i++)
#define for0(i,n) fort0(i,0,n)
#define fort1(i,a,b) for(ll i=a,i##_TO=b;i<=i##_TO;i++)
#define for1(i,n) fort1(i,1,n)
#define ford(i,a,b) for(ll i=a,i##_TO=b;i>=i##_TO;i--)
#define loop(n) for0(LOOP_COUNTER,n)
#define start_program IFD((start_time=clock()))
#define runtime ((clock()-start_time)*1.0/CLOCKS_PER_SEC)
#define halt(s) cout<<s,IFD(cout<<fixed<<setprecision(10)<<"\n\nTIME: "<<runtime<<" sec\n\n",)exit(0)
#define x first
#define y second

using namespace std;
using namespace __gnu_pbds; // pb_ds
using namespace __gnu_cxx;

#define int ll

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

template
<
    class key,
    class val=null_type, /// null_mapped_type
    class comp=less<key>
>
using ord_set=tree /// find_by_order(), order_of_key()
<
    key,
    val,
    comp,
    rb_tree_tag,
    tree_order_statistics_node_update
>;

typedef trie
<
    string,
    null_type,
    trie_string_access_traits<>,
    pat_trie_tag,
    trie_prefix_search_node_update
>
pref_trie; /// insert(), prefix_range()

template<class T,class U>
ostream&operator<<(ostream&out,pair<T,U> p)
{
    #ifdef DEBUG
        return out<<"("<<p.x<<","<<p.y<<")";
    #else
        return out<<p.x<<" "<<p.y;
    #endif
}

template<class T,class U>
istream&operator>>(istream&in,pair<T,U> p)
{
    return in>>p.x>>p.y;
}

template<class Iter,class Str>
struct _rng_
{
    Iter from,to;
    Str delim;
    _rng_(Iter from,Iter to,Str delim):from(from),to(to),delim(delim){}
};

template<class Iter,class Str>
_rng_<Iter,Str> rng(Iter from,Iter to,Str delim)
{
    return _rng_<Iter,Str>(from,to,delim);
}

template<class Iter>
auto rng(Iter from,Iter to)
{
    return rng(from,to," ");
}

template<class Cont,class Str>
auto rng(Cont&c,Str delim)
{
    return rng(all(c),delim);
}

template<class Cont>
auto rng(Cont&c)
{
    return rng(all(c));
}

template<class Iter,class Str>
ostream&operator<<(ostream&out,_rng_<Iter,Str> r)
{
    #ifdef DEBUG
        out<<distance(r.from,r.to)<<":"<<r.delim;
    #endif
    for(Iter i=r.from;i!=r.to;i++)
        out<<*i<<r.delim;
    return out;
}

template<class Iter,class Str>
istream&operator>>(istream&in,_rng_<Iter,Str> r)
{
    for(Iter i=r.from;i!=r.to;i++)
        in>>*i;
    return in;
}

template<class T>
T read()
{
    T res;
    cin>>res;
    return res;
}

template<class T>
vector<T> read(int n)
{
    vector<T> res(n);
    cin>>rng(res);
    return res;
}

IFD( clock_t start_time; )

//const int MOD=;

ll ppow(ll x,ll y,ll mod)
{
    ll res=1;
    while(y)
    {
        if(y&1)
            res=res*x%mod;
        y>>=1;
        x=x*x%mod;
    }
    return res;
}

const int N=1e5+100;
//const int INF=;

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

bool check(int n)
{
    PRT(t[1]);
    for1(i,n-1)
        for0(j,2)
        {
            int ta=bool(a[i]&(1<<j));
            int tb=bool(b[i]&(1<<j));
            int tt=bool(t[i]&(1<<j));
            IFD( cout<<ta<<tb<<tt<<"\n"; )
            if(ta)
                if(tb)
                    if(tt)
                        t[i+1]|=1<<j;
                    else
                        return false;
                else
                    if(tt)
                        {}
                    else
                        t[i+1]|=1<<j;
            else
                if(tb)
                    return false;
                else
                    if(tt)
                        return false;
                    else
                        {}
        }
    return true;
}

signed main()
{
    IFN
    (
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        cout.tie(NULL);
    )

    int n;
    cin>>n;
    cin>>rng(a+1,a+n)>>rng(b+1,b+n);
    for(t[1]=0;t[1]<=3;t[1]++)
        if(check(n))
        {
            cout<<"YES\n";
            for1(i,n) cout<<t[i]<<" ";
            exit(0);
        }
    cout<<"NO";

    IFD(cout<<fixed<<setprecision(10)<<"\n\nTIME: "<<runtime<<" sec\n\n";)
}
