#include <bits/stdc++.h>
using namespace std;
template <typename T>
void _dbg(const char* _s, T _h) {
  cerr << _s << " = " << _h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char* _s, T _h, Ts... _t) {
  int _b = 0;
  while (((_b += *_s == '(') -= *_s == ')') != 0 || *_s != ',') cerr << *_s++;
  cerr << " = " << _h << ",";
  _dbg(_s + 1, _t...);
}
using ll = long long;
const ll INF = static_cast<ll>(1e9) + 7ll;
const ll LINF = INF * INF;
const int MAXN = static_cast<int>(1e6) + 17;
int n;
int L[MAXN], R[MAXN], ans[MAXN];
bool read() {
  if (!(cin >> n)) return false;
  for (ll i = 0; i < static_cast<ll>(n); ++i) {
    cin >> L[i];
  }
  for (ll i = 0; i < static_cast<ll>(n); ++i) {
    cin >> R[i];
  }
  return true;
}
void solve() {
  vector<int> v(n);
  iota(v.begin(), v.end(), 0);
  sort(v.begin(), v.end(),
       [](int i, int j) { return L[i] + R[i] > L[j] + R[j]; });
  for (int l = 0; l < n;) {
    int r = l;
    vector<int> vec;
    for (; r < n && L[v[r]] + R[v[r]] == L[v[l]] + R[v[l]]; ++r) {
      vec.push_back(v[r]);
    }
    sort(vec.begin(), vec.end());
    for (int i : vec) ans[i] = l + 1;
    l = r;
  }
  for (int i = 0; i < n; ++i) {
    int l1, r1;
    l1 = r1 = 0;
    for (int j = 0; j < n; ++j) {
      if (j < i && ans[j] > ans[i])
        ++l1;
      else if (j > i && ans[j] > ans[i])
        ++r1;
    }
    if (!(l1 == L[i] && r1 == R[i])) {
      cout << "NO\n";
      return;
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; ++i) {
    cout << ans[i] << ' ';
  }
  cout << '\n';
}
int32_t main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  while (read()) solve();
  return 0;
}
