#include <bits/stdc++.h>
using namespace std;
int n, st[(long long)5e3 + 3], dr[(long long)5e3 + 3];
queue<long long> q1, q2;
long long nr, nod, t, sol[(long long)5e3 + 3], viz[(long long)5e3 + 3],
    s1[(long long)5e3 + 3], d1[(long long)5e3 + 3], act;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> st[i];
    s1[i] = st[i];
  }
  for (long long i = 1; i <= n; ++i) {
    cin >> dr[i];
    d1[i] = dr[i];
  }
  for (long long i = 1; i <= n; ++i) {
    if (st[i] + dr[i] == 0) {
      viz[i] = 1;
      q1.push(i);
      q2.push(n);
    }
  }
  if (q1.empty()) {
    cout << "NO";
    return 0;
  }
  nr = n;
  while (!q1.empty()) {
    nod = q1.front();
    q1.pop();
    t = q2.front();
    q2.pop();
    sol[nod] = t;
    for (long long i = 1; i < nod; ++i) {
      --dr[i];
      if (!viz[i] && st[i] + dr[i] == 0) {
        viz[i] = 1;
        q1.push(i);
        q2.push(t - 1);
      }
    }
    for (long long i = nod + 1; i <= n; ++i) {
      --st[i];
      if (!viz[i] && st[i] + dr[i] == 0) {
        viz[i] = 1;
        q1.push(i);
        q2.push(t - 1);
      }
    }
  }
  for (long long i = 1; i <= n; ++i) {
    if (sol[i] < 1 || sol[i] > n) {
      cout << "NO";
      return 0;
    }
  }
  for (long long i = 1; i <= n; ++i) {
    act = 0;
    for (long long j = 1; j < i; ++j)
      if (sol[j] > sol[i]) ++act;
    if (act != s1[i]) {
      cout << "NO";
      return 0;
    }
    act = 0;
    for (long long j = i + 1; j <= n; ++j)
      if (sol[j] > sol[i]) ++act;
    if (act != d1[i]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES\n";
  for (long long i = 1; i <= n; ++i) cout << sol[i] << ' ';
  return 0;
}
