#include <bits/stdc++.h>
using namespace std;
int p[104];
int dsu(int node) {
  return (node == p[node]) ? node : (p[node] = dsu(p[node]));
}
void no() {
  puts("NO");
  exit(0);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i <= 100; i++) p[i] = i;
  int per[n + 3], fav[n + 3];
  for (int i = 1; i <= n; i++) scanf("%d", &per[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &fav[i]);
  for (int i = 1; i <= n; i++) {
    int o = i - fav[i], t = i + fav[i];
    if (o > 0) {
      int x = dsu(o), y = dsu(i);
      p[x] = p[y];
    }
    if (t <= n) {
      int x = dsu(t), y = dsu(i);
      p[x] = p[y];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (dsu(per[i]) != dsu(i)) {
      no();
    }
  }
  puts("YES");
}
