#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
long long n, x, y, z, ans;
long long a[N], b[N], par[N], sz[N];
long long get(long long x) {
  if (par[x] == x) return x;
  return par[x] = get(par[x]);
}
void merge(long long x, long long y) {
  long long root_a = get(x);
  long long root_b = get(y);
  if (sz[root_a] < sz[root_b]) {
    par[root_a] = par[root_b];
    sz[root_b] += sz[root_a];
  } else {
    par[root_b] = par[root_a];
    sz[root_a] += sz[root_b];
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    for (long long i = 0; i < N; i++) {
      par[i] = i;
      sz[i] = 1;
    }
    cin >> n;
    for (long long i = 1; i < n + 1; i++) cin >> a[i];
    for (long long i = 1; i < n + 1; i++) cin >> b[i];
    for (long long i = 1; i < n + 1; i++) {
      long long left = i - b[i];
      long long right = i + b[i];
      long long p1 = get(i);
      if (left >= 1) {
        long long p2 = get(left);
        if (p1 != p2) merge(p1, p2);
      }
      if (right <= n) {
        long long p2 = get(right);
        if (p1 != p2) merge(p1, p2);
      }
    }
    long long f = 0;
    for (long long i = 1; i < n + 1; i++) {
      long long p1 = get(i);
      long long p2 = get(a[i]);
      if (p1 != p2) f = 1;
    }
    if (f)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
