#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tune=native")
using namespace std;
inline int read() {
  register int res = 0, neg = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') neg = -1;
  for (; isdigit(c); c = getchar()) res = res * 10 + c - '0';
  return res * neg;
}
const int maxn = 105;
int f[maxn], d[maxn], par[maxn];
int find(int x) {
  if (x == par[x]) return x;
  return par[x] = find(par[x]);
}
void merge(int x, int y) {
  x = find(x), y = find(y);
  if (x == y) return;
  par[y] = x;
}
int main() {
  int n = read();
  for (int i = 1; i <= n; i++) f[i] = read();
  for (int i = 1; i <= n; i++) d[i] = read();
  for (int i = 1; i <= n; i++) par[i] = i;
  for (int i = 1; i <= n; i++) {
    if (i - d[i] >= 1) merge(i, i - d[i]);
    if (i + d[i] <= n) merge(i, i + d[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (find(i) != find(f[i])) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  return 0;
}
