#include <bits/stdc++.h>
using namespace std;
int l[1500];
int r[1500];
int a[1500];
bool u[1500];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> l[i];
  }
  for (int i = 1; i <= n; ++i) {
    cin >> r[i];
  }
  int x = n;
  int cnt = 0;
  while (cnt < n) {
    stack<int> v;
    for (int i = 1; i <= n; ++i) {
      if (!u[i] && l[i] == r[i] && l[i] == 0) {
        v.push(i);
        a[i] = x;
        u[i] = 1;
      }
    }
    if (v.empty()) {
      cout << "NO";
      return 0;
    }
    cnt += v.size();
    stack<int> rv;
    for (int i = n, c = 0; i >= 1; --i) {
      if (!u[i]) {
        r[i] -= c;
      }
      if (!v.empty() && i == v.top()) {
        c++;
        rv.push(v.top());
        v.pop();
      }
    }
    for (int i = 1, c = 0; i <= n; ++i) {
      if (!u[i]) {
        l[i] -= c;
      }
      if (!rv.empty() && i == rv.top()) {
        c++;
        rv.pop();
      }
    }
    x--;
  }
  cout << "YES\n";
  for (int i = 1; i <= n; ++i) {
    cout << a[i] << ' ';
  }
}
