#include <bits/stdc++.h>
using namespace std;
int k, n;
set<int> v;
int ar1[100000];
int ar2[100000];
int m[1000000];
int d[100000];
int r[100000];
int findset(int l1) {
  if (d[l1] == l1)
    return l1;
  else
    return d[l1] = findset(d[l1]);
}
void link(int l1, int l2) {
  int x = findset(l1);
  int y = findset(l2);
  if (x == y) return;
  if (r[x] > r[y]) {
    d[y] = x;
  } else {
    d[x] = y;
    if (r[y] == r[x]) r[y]++;
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> ar1[i];
  }
  for (int i = 1; i <= n; i++) {
    r[i] = 1;
    d[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    int o;
    cin >> o;
    if (o < i) {
      link(i, i - o);
    }
    if (o + i <= n) link(i, i + o);
  }
  bool w = true;
  for (int i = 1; i <= n; i++) {
    v.insert(ar1[i]);
    if (ar1[i] < 1 || ar1[i] > n) {
      cout << "NO";
      return 0;
    }
    if (findset(i) == findset(ar1[i])) continue;
    w = false;
    break;
  }
  if (w)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
