#include <bits/stdc++.h>
using namespace std;
int n, i, j;
int par[105], a[105], nei[105];
int fnd(int x) { return (par[x] == x) ? (par[x]) : (par[x] = fnd(par[x])); }
void un(int x, int y) { par[fnd(x)] = fnd(y); }
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    par[i] = i;
  }
  for (i = 1; i <= n; i++) {
    cin >> nei[i];
    if (i + nei[i] <= n) un(i, i + nei[i]);
    if (i - nei[i] >= 1) un(i, i - nei[i]);
  }
  for (i = 1; i <= n; i++) {
    if (fnd(i) == i) {
      int c[105] = {};
      for (j = 1; j <= n; j++)
        if (fnd(j) == i) {
          c[j]++;
          c[a[j]]--;
        }
      for (j = 1; j <= n; j++)
        if (c[j]) break;
      if (j <= n) break;
    }
  }
  if (i <= n)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
