#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<int>> a(n - 1, vector<int>(2)), o(n - 1, vector<int>(2)),
      f(n, vector<int>(2));
  for (int i = 0; i < n - 1; i++) {
    int x;
    cin >> x;
    o[i][0] = x / 2;
    o[i][1] = x % 2;
  }
  for (int i = 0; i < n - 1; i++) {
    int x;
    cin >> x;
    a[i][0] = x / 2;
    a[i][1] = x % 2;
  }
  for (int x = 0; x < 2; x++)
    for (int y = 0; y < 2; y++) {
      f[0] = {x, y};
      bool fl = true;
      for (int i = 1; i < n; i++)
        for (int q = 0; q < 2; q++)
          if (f[i - 1][q] == 0) {
            fl = fl && a[i - 1][q] == 0;
            f[i][q] = o[i - 1][q];
          } else {
            fl = fl && o[i - 1][q] == 1;
            f[i][q] = a[i - 1][q];
          }
      if (fl) {
        cout << "YES" << endl;
        for (int i = 0; i < n; i++) cout << f[i][0] * 2 + f[i][1] << ' ';
        return 0;
      }
    }
  cout << "NO";
  return 0;
}
