#include <bits/stdc++.h>
using namespace std;
int a[110][110];
int n;
int b[110];
int p[110];
int main() {
  while (scanf("%d", &n) != EOF) {
    memset(a, 0, sizeof(a));
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
      a[i][i] = 1;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &p[i]);
      int s = i - p[i];
      if (s >= 1 && s <= n) a[s][i] = a[i][s] = 1;
      s = i + p[i];
      if (s >= 1 && s <= n) a[s][i] = a[i][s] = 1;
    }
    for (int k = 1; k <= n; k++)
      for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++) {
          if (a[i][k] == 1 && a[k][j] == 1) a[i][j] = 1;
        }
    int ok = 1;
    for (int i = 1; i <= n; i++)
      if (!(a[i][b[i]] == 1 || a[b[i]][i] == 1)) ok = 0;
    if (ok)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
