#include <bits/stdc++.h>
using namespace std;
bool fun(int* arr, int* brr, pair<int, int>* crr, int i) {
  int a0 = arr[i] & 1, a1 = (arr[i] / 2) & 1, b0 = brr[i] & 1,
      b1 = (brr[i] / 2) & 1;
  if (a0 == 1 && b0 == 0) {
    if (crr[i].first == -1)
      crr[i + 1].first = -1;
    else
      crr[i + 1].first = 1 ^ crr[i].first;
  } else {
    if (a0 == 1 && b0 == 1) {
      if (crr[i].first == 0)
        return false;
      else
        crr[i].first = crr[i + 1].first = 1;
    } else {
      if (a0 == 0 && b0 == 1)
        return false;
      else {
        if (crr[i].first == 1)
          return false;
        else
          crr[i].first = crr[i + 1].first = 0;
      }
    }
  }
  if (a1 == 1 && b1 == 0) {
    if (crr[i].second == -1)
      crr[i + 1].second = -1;
    else
      crr[i + 1].second = 1 ^ crr[i].second;
  } else {
    if (a1 == 1 && b1 == 1) {
      if (crr[i].second == 0)
        return false;
      else
        crr[i].second = crr[i + 1].second = 1;
    } else {
      if (a1 == 0 && b1 == 1)
        return false;
      else {
        if (crr[i].second == 1)
          return false;
        else
          crr[i].second = crr[i + 1].second = 0;
      }
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  int arr[100010], brr[100010];
  pair<int, int> crr[100010];
  for (int i = 1; i < n; ++i) {
    cin >> arr[i];
    crr[i].first = crr[i].second = -1;
  }
  for (int i = 1; i < n; ++i) cin >> brr[i];
  crr[n].first = crr[n].second = -1;
  bool poss = true;
  for (int i = 1; i < n; ++i) {
    if (!fun(arr, brr, crr, i)) {
      poss = false;
      break;
    }
  }
  if (poss) {
    crr[n + 1].first = crr[n + 1].second = 0;
    cout << "YES" << endl;
    for (int i = n; i >= 1; --i) {
      if (crr[i].first == -1) {
        crr[i].first = 1 ^ crr[i + 1].first;
      }
      if (crr[i].second == -1) {
        crr[i].second = 1 ^ crr[i + 1].second;
      }
    }
    for (int i = 1; i <= n; ++i)
      cout << crr[i].second * 2 + crr[i].first << " ";
  } else
    cout << "NO" << endl;
}
