#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int inf = INT_MAX;
const long long mod = 1e9 + 7;
const int pi = acos(-1);
const int dx[4] = {0, 0, 1, -1};
const int dy[4] = {1, -1, 0, 0};
const int N = 1e5 + 5;
int a[N], b[N], t[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < n; i++) {
    cin >> b[i];
  }
  t[1] = 0;
  int d = 0;
  for (int i = 1; i < n; i++) {
    int w = 0;
    for (int j = 0; j <= 3; j++) {
      int first, second;
      if (t[i] == 0) {
        if (j == 0) first = 0, second = 0;
        if (j == 1) first = 1, second = 0;
        if (j == 2) first = 2, second = 0;
        if (j == 3) first = 3, second = 0;
      }
      if (t[i] == 1) {
        if (j == 0) first = 1, second = 0;
        if (j == 1) first = 1, second = 1;
        if (j == 2) first = 3, second = 0;
        if (j == 3) first = 3, second = 1;
      }
      if (t[i] == 2) {
        if (j == 0) first = 2, second = 0;
        if (j == 1) first = 3, second = 0;
        if (j == 2) first = 2, second = 2;
        if (j == 3) first = 3, second = 2;
      }
      if (t[i] == 3) {
        if (j == 0) first = 3, second = 0;
        if (j == 1) first = 3, second = 1;
        if (j == 2) first = 3, second = 2;
        if (j == 3) first = 3, second = 3;
      }
      if (first == a[i] && second == b[i]) {
        t[i + 1] = j;
        w = 1;
        break;
      }
    }
    if (!w) {
      d = 1;
      break;
    }
  }
  if (!d) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      cout << t[i] << " ";
    }
    return 0;
  }
  d = 0;
  t[1] = 1;
  for (int i = 1; i < n; i++) {
    int w = 0;
    for (int j = 0; j <= 3; j++) {
      int first, second;
      if (t[i] == 0) {
        if (j == 0) first = 0, second = 0;
        if (j == 1) first = 1, second = 0;
        if (j == 2) first = 2, second = 0;
        if (j == 3) first = 3, second = 0;
      }
      if (t[i] == 1) {
        if (j == 0) first = 1, second = 0;
        if (j == 1) first = 1, second = 1;
        if (j == 2) first = 3, second = 0;
        if (j == 3) first = 3, second = 1;
      }
      if (t[i] == 2) {
        if (j == 0) first = 2, second = 0;
        if (j == 1) first = 3, second = 0;
        if (j == 2) first = 2, second = 2;
        if (j == 3) first = 3, second = 2;
      }
      if (t[i] == 3) {
        if (j == 0) first = 3, second = 0;
        if (j == 1) first = 3, second = 1;
        if (j == 2) first = 3, second = 2;
        if (j == 3) first = 3, second = 3;
      }
      if (first == a[i] && second == b[i]) {
        t[i + 1] = j;
        w = 1;
        break;
      }
    }
    if (!w) {
      d = 1;
      break;
    }
  }
  if (!d) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      cout << t[i] << " ";
    }
    return 0;
  }
  d = 0;
  t[1] = 2;
  for (int i = 1; i < n; i++) {
    int w = 0;
    for (int j = 0; j <= 3; j++) {
      int first, second;
      if (t[i] == 0) {
        if (j == 0) first = 0, second = 0;
        if (j == 1) first = 1, second = 0;
        if (j == 2) first = 2, second = 0;
        if (j == 3) first = 3, second = 0;
      }
      if (t[i] == 1) {
        if (j == 0) first = 1, second = 0;
        if (j == 1) first = 1, second = 1;
        if (j == 2) first = 3, second = 0;
        if (j == 3) first = 3, second = 1;
      }
      if (t[i] == 2) {
        if (j == 0) first = 2, second = 0;
        if (j == 1) first = 3, second = 0;
        if (j == 2) first = 2, second = 2;
        if (j == 3) first = 3, second = 2;
      }
      if (t[i] == 3) {
        if (j == 0) first = 3, second = 0;
        if (j == 1) first = 3, second = 1;
        if (j == 2) first = 3, second = 2;
        if (j == 3) first = 3, second = 3;
      }
      if (first == a[i] && second == b[i]) {
        t[i + 1] = j;
        w = 1;
        break;
      }
    }
    if (!w) {
      d = 1;
      break;
    }
  }
  if (!d) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      cout << t[i] << " ";
    }
    return 0;
  }
  d = 0;
  t[1] = 3;
  for (int i = 1; i < n; i++) {
    int w = 0;
    for (int j = 0; j <= 3; j++) {
      int first, second;
      if (t[i] == 0) {
        if (j == 0) first = 0, second = 0;
        if (j == 1) first = 1, second = 0;
        if (j == 2) first = 2, second = 0;
        if (j == 3) first = 3, second = 0;
      }
      if (t[i] == 1) {
        if (j == 0) first = 1, second = 0;
        if (j == 1) first = 1, second = 1;
        if (j == 2) first = 3, second = 0;
        if (j == 3) first = 3, second = 1;
      }
      if (t[i] == 2) {
        if (j == 0) first = 2, second = 0;
        if (j == 1) first = 3, second = 0;
        if (j == 2) first = 2, second = 2;
        if (j == 3) first = 3, second = 2;
      }
      if (t[i] == 3) {
        if (j == 0) first = 3, second = 0;
        if (j == 1) first = 3, second = 1;
        if (j == 2) first = 3, second = 2;
        if (j == 3) first = 3, second = 3;
      }
      if (first == a[i] && second == b[i]) {
        t[i + 1] = j;
        w = 1;
        break;
      }
    }
    if (!w) {
      d = 1;
      break;
    }
  }
  if (!d) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      cout << t[i] << " ";
    }
  } else {
    cout << "NO";
  }
}
