#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long SIZE = 1e5 + 5;
const long long mod = 1e9 + 7;
long long a[SIZE], b[SIZE];
long long dp[SIZE][5];
long long dir[SIZE][5];
long long solve(long long pos, long long prv) {
  if (pos == 0) return 1;
  if (dp[pos][prv] != -1) return dp[pos][prv];
  long long i, x, y, p(0);
  for (i = 0; i < 4; i++) {
    x = prv | i;
    y = prv & i;
    if (x == a[pos] && y == b[pos]) {
      p = solve(pos - 1, i);
      if (p) {
        dir[pos][prv] = i;
        break;
      }
    }
  }
  return dp[pos][prv] = p;
}
int main() {
  long long t = 0, n, x, y, z, i, j, k, g, p, q, ans = 0, sum = 0, c = 0;
  string s, s1, s2;
  scanf("%lld", &n);
  for (i = 1; i <= n - 1; i++) scanf("%lld", &a[i]);
  for (i = 1; i <= n - 1; i++) scanf("%lld", &b[i]);
  memset(dp, -1, sizeof dp);
  memset(dir, -1, sizeof dir);
  for (i = 0; i < 4; i++) {
    ans = solve(n - 1, i);
    if (ans) {
      p = i;
      break;
    }
  }
  if (!ans)
    puts("NO");
  else {
    vector<long long> v;
    v.push_back(p);
    x = n - 1;
    while (dir[x][p] != -1) {
      p = dir[x][p];
      x--;
      v.push_back(p);
    }
    puts("YES");
    for (i = n - 1; i >= 0; i--) cout << v[i] << " ";
    printf("\n");
  }
  return 0;
}
