#include <bits/stdc++.h>
using namespace std;
int n, a[105], bk[105], tot, q[105];
bool f[105][105];
inline void bfs(int x) {
  q[0] = x;
  int h = 0, t = 1;
  while (h < t) {
    for (int i = 1; i <= n; i++) {
      if (!f[i][q[h]] || bk[i]) continue;
      bk[i] = tot;
      q[t++] = i;
    }
    h++;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    int d;
    scanf("%d", &d);
    if (i > d) f[i - d][i] = f[i][i - d] = 1;
    if (i + d <= n) f[i + d][i] = f[i][i + d] = 1;
  }
  for (int i = 1; i <= n; i++) {
    if (bk[i]) continue;
    bk[i] = ++tot;
    bfs(i);
  }
  for (int i = 1; i <= n; i++)
    if (bk[i] != bk[a[i]]) {
      puts("NO");
      return 0;
    }
  puts("YES");
  return 0;
}
