#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j;
  cin >> n;
  long long int a[n], b[n], t[n];
  for (i = 1; i < n; i++) cin >> a[i];
  for (i = 1; i < n; i++) cin >> b[i];
  for (i = 0; i < 4; i++) {
    t[0] = i;
    for (j = 1; j < n; j++) {
      if (a[j] == 3 && b[j] == 0) {
        if (t[j - 1] == 1)
          t[j] = 2;
        else if (t[j - 1] == 2)
          t[j] = 1;
        else if (t[j - 1] == 3)
          t[j] = 0;
        else
          t[j] = 3;
        continue;
      }
      if (a[j] < b[j]) {
        cout << "NO";
        return 0;
      }
      if (a[j] == 2 && b[j] == 1) {
        cout << "NO";
        return 0;
      }
      if (t[j - 1] == a[j])
        t[j] = b[j];
      else if (t[j - 1] == b[j])
        t[j] = a[j];
      else
        break;
    }
    if (j == n) break;
  }
  if (i == 4) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (i = 0; i < n; i++) cout << t[i] << " ";
  return 0;
}
