#include <bits/stdc++.h>
using namespace std;
int fa[101], a[101], d[101], c[101];
int n, i, j;
int Find(int x) { return fa[x] == x ? fa[x] : fa[x] = Find(fa[x]); }
void Union(int x, int y) { fa[Find(x)] = Find(y); }
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    fa[i] = i;
  }
  for (i = 1; i <= n; i++) {
    cin >> d[i];
    if (i + d[i] <= n) Union(i, i + d[i]);
    if (i - d[i] >= 1) Union(i, i - d[i]);
  }
  for (i = 1; i <= n; i++)
    if (Find(i) == i) {
      memset(c, 0, sizeof(c));
      for (j = 1; j <= n; j++)
        if (Find(j) == i) c[j]++, c[a[j]]--;
      for (j = 1; j <= n; j++)
        if (c[j]) break;
      if (j <= n) break;
    }
  if (i <= n) return puts("NO"), 0;
  puts("YES");
  return 0;
}
