#include <bits/stdc++.h>
using namespace std;
int const MAXN = 3e3;
int v[2][MAXN];
int ans[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  int n;
  cin >> n;
  set<int> last;
  for (int i = 0; i < n; i++) {
    cin >> v[0][i];
    last.insert(i);
  }
  for (int i = 0; i < n; i++) cin >> v[1][i];
  int now = n;
  while (!last.empty()) {
    set<int> null;
    for (int i = 0; i < n; i++)
      if (v[0][i] == 0 && v[1][i] == 0 && last.find(i) != last.end()) {
        null.insert(i);
        last.erase(last.find(i));
      }
    for (auto i : null) {
      ans[i] = now;
      for (auto j : last) {
        if (j < i)
          v[1][j]--;
        else
          v[0][j]--;
        if (v[0][j] < 0 || v[1][j] < 0) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
    if (null.empty()) {
      if (!last.empty()) {
        cout << "NO" << endl;
        return 0;
      } else
        break;
    }
    now--;
  }
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
