#include <bits/stdc++.h>
using namespace std;
int a[100010];
int b[100010];
int ans[100010];
int h[4][4] = {0, 1, 2, 3, 1, 1, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3};
int q[4][4] = {0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 2, 2, 0, 1, 2, 3};
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i < n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) scanf("%d", &b[i]);
  int is = 0;
  for (int i = 0; i < 4; i++) {
    ans[1] = i;
    int flag1 = 0;
    for (int j = 1; j < n; j++) {
      int flag = 0;
      for (int k = 0; k < 4; k++) {
        if (h[ans[j]][k] == a[j] && q[ans[j]][k] == b[j]) {
          ans[j + 1] = k;
          flag = 1;
          break;
        }
      }
      if (flag == 0) {
        flag1 = 1;
        break;
      }
    }
    if (flag1 == 0) {
      is = 1;
      puts("YES");
      for (int j = 1; j <= n; j++) {
        if (j != 1) printf(" ");
        printf("%d", ans[j]);
      }
      printf("\n");
      break;
    }
  }
  if (is == 0) puts("NO");
}
