#include <bits/stdc++.h>
using namespace std;
int a[102], d[102], f[102];
int find(int x) {
  if (f[x] == x) return x;
  return f[x] = find(f[x]);
}
int main() {
  int n;
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) f[i] = i;
  for (register int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (register int i = 1; i <= n; ++i) scanf("%d", &d[i]);
  for (register int i = 1; i <= n; ++i) {
    int l = i - d[i];
    int r = i + d[i];
    if (l >= 1) {
      int x = find(l);
      int y = find(i);
      if (x != y) f[x] = y;
    }
    if (r <= n) {
      int x = find(r);
      int y = find(i);
      if (x != y) f[x] = y;
    }
  }
  for (register int i = 1; i <= n; ++i) {
    if (find(i) != find(a[i])) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
