#include <bits/stdc++.h>
using namespace std;
int g[105], w;
int find(int x) {
  if (g[x] == x)
    return g[x];
  else
    return g[x] = find(g[x]);
}
void Union(int x, int y) { g[find(x)] = find(y); }
int main() {
  int n, i, j;
  int a[105], d[105];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    g[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> w;
    if (i + w <= n) Union(i, i + w);
    if (i - w >= 1) Union(i, i - w);
  }
  bool f = true;
  for (int i = 1; i <= n; i++) {
    if (find(i) != find(a[i])) f = false;
  }
  puts(f ? "YES" : "NO");
  return 0;
}
