#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = ans * a;
    a = a * a;
    b >>= 1;
  }
  return ans;
}
long long powerMod(long long a, long long b, long long m) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = ans * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return ans;
}
long long modInverse(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
class DSU {
 private:
  long long n;
  long long *id;
  long long *w;

 public:
  DSU(long long n) {
    this->n = n;
    id = new long long[n + 1];
    w = new long long[n + 1];
    for (long long i = 1; i <= n; i++) {
      id[i] = i;
      w[i] = 1;
    }
  }
  long long root(long long n) {
    while (n != id[n]) {
      id[n] = id[id[n]];
      n = id[n];
    }
    return n;
  }
  bool find(long long a, long long b) { return root(a) == root(b); }
  void unite(long long a, long long b) {
    long long aroot = root(a);
    long long broot = root(b);
    if (aroot == broot) return;
    if (w[aroot] < w[broot]) {
      id[aroot] = broot;
      w[broot] += w[aroot];
    } else {
      id[broot] = aroot;
      w[aroot] += w[broot];
    }
  }
};
int main() {
  long long t;
  cin >> t;
  DSU dsu(t);
  long long arr[t + 1];
  for (long long i = 1; i <= t; i++) cin >> arr[i];
  for (long long i = 1; i <= t; i++) {
    long long s;
    cin >> s;
    if (i - s >= 1) dsu.unite(i, i - s);
    if (i + s <= t) dsu.unite(i, i + s);
  }
  bool flag = 1;
  for (long long i = 1; i <= t; i++) {
    if (!dsu.find(arr[i], i)) flag = 0;
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
}
