#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
void init_ios() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
const int N = 1005;
int n, res[N], l[N], r[N];
vector<int> rem;
vector<pair<pair<int, int>, int>> v, v2;
int main() {
  init_ios();
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> l[i];
  for (int i = 0; i < n; ++i) {
    cin >> r[i];
    v.push_back({{l[i], r[i]}, i});
  }
  int co = n + 1;
  while (v.size()) {
    --co;
    if (co == 0) {
      cout << "NO\n";
      return 0;
    }
    rem.clear();
    for (int i = 0; i < v.size(); ++i) {
      if (v[i].first.first == 0 && v[i].first.second == 0) {
        res[v[i].second] = co;
        rem.push_back(i);
      }
    }
    int id = 0, all = rem.size();
    v2.clear();
    for (int i = 0; i < v.size(); ++i) {
      if (id < rem.size() && i == rem[id]) {
        ++id;
        continue;
      }
      v2.push_back({{v[i].first.first - id, v[i].first.second - (all - id)},
                    v[i].second});
      if (v2.back().first.first < 0 || v2.back().first.second < 0) {
        cout << "NO\n";
        return 0;
      }
    }
    v = v2;
  }
  cout << "YES\n";
  for (int i = 0; i < n; ++i) cout << res[i] << " ";
  cout << "\n";
}
