#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e2 + 10;
long long a[maxn], mark[maxn], b[maxn];
vector<long long> idx, val;
vector<long long> v[maxn];
long long n;
void dfs(long long u) {
  idx.push_back(u);
  val.push_back(a[u]);
  mark[u] = 1;
  for (int i = 0; i < v[u].size(); i++) {
    if (mark[v[u][i]] == 0) {
      dfs(v[u][i]);
    }
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    b[i] = i;
  }
  for (int i = 1, q; i <= n; i++) {
    cin >> q;
    if (i + q <= n) {
      v[i].push_back(i + q);
      v[i + q].push_back(i);
    }
    if (i - q >= 1) {
      v[i].push_back(i - q);
      v[i - q].push_back(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    idx.clear();
    val.clear();
    if (mark[i] == 0) {
      dfs(i);
      sort(idx.begin(), idx.end());
      sort(val.begin(), val.end());
      for (int i = 0; i < idx.size(); i++) {
        a[idx[i]] = val[i];
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] != b[i]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
