#include <bits/stdc++.h>
using namespace std;
int a[101];
void initialize() {
  for (int i = 1; i <= 100; i++) {
    a[i] = i;
  }
}
int set_of(int u) {
  if (a[u] == u) {
    return u;
  } else {
    return a[u] = set_of(a[u]);
  }
}
void union_(int u, int v) { a[set_of(u)] = set_of(v); }
void solve() {
  initialize();
  int n;
  cin >> n;
  int p[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
  }
  int f[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> f[i];
    if (i - f[i] >= 1 && set_of(i) != set_of(i - f[i])) {
      union_(i - f[i], i);
    }
    if (i + f[i] <= n && set_of(i) != set_of(i + f[i])) {
      union_(i + f[i], i);
    }
  }
  vector<int> sets[n + 1];
  for (int i = 1; i <= n; i++) {
    sets[set_of(i)].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    if (sets[i].size() == 1) {
      if (p[i] != i) {
        cout << "NO\n";
        return;
      }
    } else if (sets[i].size() > 1) {
      vector<int> temp;
      for (int j = 0; j < sets[i].size(); j++) {
        temp.push_back(p[sets[i][j]]);
      }
      sort(temp.begin(), temp.end());
      for (int j = 0; j < sets[i].size(); j++) {
        if (sets[i][j] != temp[j]) {
          cout << "NO\n";
          return;
        }
      }
    }
  }
  cout << "\nYES\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
}
