#include <bits/stdc++.h>
using namespace std;
const int maxx = 1e2 + 100;
int f[maxx];
int a[maxx];
int n;
inline int getf(int u) {
  if (u == f[u])
    return u;
  else
    return f[u] = getf(f[u]);
}
inline void merge(int u, int v) {
  int t1 = getf(u);
  int t2 = getf(v);
  if (t1 != t2) {
    f[t1] = t2;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), f[i] = i;
  int x;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    if (i - x >= 1) merge(i, i - x);
    if (i + x <= n) merge(i, i + x);
  }
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    if (getf(a[i]) != getf(i)) {
      flag = 1;
      break;
    }
  }
  if (flag)
    puts("NO");
  else
    puts("YES");
}
