#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int l[maxn], r[maxn];
int ans[maxn];
void solve() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &l[i]);
  }
  set<int> st;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &r[i]);
    st.insert(i);
  }
  int mx = n;
  vector<int> v;
  memset(ans, -1, sizeof(ans));
  while (st.size()) {
    v.clear();
    for (auto it = st.begin(); it != st.end(); ++it) {
      int ind1 = *it;
      if (!l[ind1] and !r[ind1]) {
        v.push_back(ind1);
      }
    }
    if (!v.size()) {
      puts("NO");
      return;
    }
    for (auto val : v) {
      ans[val] = mx;
      for (auto it = st.begin(); it != st.end(); ++it) {
        if (ans[val] == -1) continue;
        int ind = *it;
        if (ind < val) {
          r[ind]--;
        }
      }
    }
    reverse((v).begin(), (v).end());
    for (auto val : v) {
      st.erase(val);
      for (auto it = st.begin(); it != st.end(); ++it) {
        if (ans[val] == -1) {
          continue;
        }
        int ind = *it;
        if (ind > val) {
          l[ind]--;
        }
      }
    }
    mx--;
  }
  puts("YES");
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
