#include <bits/stdc++.h>
using namespace std;
int n, par[105], val[105], d[105];
int u[105], v[105];
int f(int x) {
  if (par[x] == x)
    return x;
  else
    return par[x] = f(par[x]);
}
void mer(int a, int b) {
  int pa = f(a);
  int pb = f(b);
  if (pa != pb) par[pa] = pb;
  return;
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) par[i] = i;
  for (int i = (1); i <= (n); i++) scanf("%d", &val[i]);
  for (int i = (1); i <= (n); i++) {
    scanf("%d", &d[i]);
    if (i + d[i] <= n) mer(i, i + d[i]);
    if (i - d[i] >= 1) mer(i, i - d[i]);
  }
  for (int i = (1); i <= (n); i++) {
    u[i] = f(i);
    v[val[i]] = f(i);
  }
  for (int i = (1); i <= (n); i++)
    if (u[i] != v[i]) {
      printf("NO\n");
      return 0;
    }
  printf("YES\n");
  return 0;
}
