#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n;
  vector<vector<int>> Res(n, vector<int>(2, 0)), A(n - 1, vector<int>(2, 0)),
      B(n - 1, vector<int>(2, 0));
  for (int i = 0; i < n - 1; i++) {
    int num;
    cin >> num;
    if (num == 3) {
      A[i][1] = 1;
      A[i][0] = 1;
    }
    if (num == 2) {
      A[i][1] = 1;
      A[i][0] = 0;
    }
    if (num == 1) {
      A[i][1] = 0;
      A[i][0] = 1;
    }
    if (num == 0) {
      A[i][1] = 0;
      A[i][0] = 0;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    int num;
    cin >> num;
    if (num == 3) {
      B[i][1] = 1;
      B[i][0] = 1;
    }
    if (num == 2) {
      B[i][1] = 1;
      B[i][0] = 0;
    }
    if (num == 1) {
      B[i][1] = 0;
      B[i][0] = 1;
    }
    if (num == 0) {
      B[i][1] = 0;
      B[i][0] = 0;
    }
  }
  for (int t = 0; t <= 3; t++) {
    bool ok = 1;
    if (t == 3) {
      Res[0][1] = 1;
      Res[0][0] = 1;
    }
    if (t == 2) {
      Res[0][1] = 1;
      Res[0][0] = 0;
    }
    if (t == 1) {
      Res[0][1] = 0;
      Res[0][0] = 1;
    }
    if (t == 0) {
      Res[0][1] = 0;
      Res[0][0] = 0;
    }
    for (int i = 1; i < n; i++) {
      if (!ok) break;
      for (int j = 0; j <= 1; j++) {
        if (A[i - 1][j] == 1 && B[i - 1][j] == 1) {
          if (Res[i - 1][j] == 0) {
            ok = 0;
            break;
          };
          Res[i][j] = 1;
        }
        if (A[i - 1][j] == 1 && B[i - 1][j] == 0) {
          if (Res[i - 1][j] == 0) {
            Res[i][j] = 1;
          };
          if (Res[i - 1][j] == 1) {
            Res[i][j] = 0;
          };
        }
        if (A[i - 1][j] == 0 && B[i - 1][j] == 1) {
          ok = 0;
          break;
        }
        if (A[i - 1][j] == 0 && B[i - 1][j] == 0) {
          if (Res[i - 1][j] == 1) {
            ok = 0;
            break;
          };
          Res[i][j] = 0;
        }
      }
    }
    if (ok) {
      cout << "YES\n";
      for (int i = 0; i < n; i++) {
        cout << Res[i][1] * 2 + Res[i][0] << ' ';
      }
      return 0;
    }
  }
  cout << "NO\n";
}
