#include <bits/stdc++.h>
using namespace std;
int mat[105][105];
int perm[105];
int fav[105];
int main() {
  int n;
  int i, j, k, tmp;
  for (i = 0; i < 105; i++) {
    for (j = 0; j < 105; j++) {
      mat[i][j] = 200000000;
    }
  }
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &perm[i]);
    perm[i]--;
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &fav[i]);
  }
  for (i = 0; i < n; i++) {
    mat[i][i] = 0;
    if (i + fav[i] < n) {
      mat[i][i + fav[i]] = mat[i + fav[i]][i] = 1;
    }
    if (i - fav[i] > -1) {
      mat[i][i - fav[i]] = mat[i - fav[i]][i] = 1;
    }
  }
  for (k = 0; k < n; k++) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        if (mat[i][k] + mat[k][j] < mat[i][j])
          mat[i][j] = mat[i][k] + mat[k][j];
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (mat[i][perm[i]] == 200000000 && mat[perm[i]][i] == 200000000) break;
  }
  if (i < n)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
