#include <bits/stdc++.h>
using namespace std;
long long parent[200];
long long findpar(long long x) {
  if (x == parent[x]) {
    return x;
  }
  return parent[x] = findpar(parent[x]);
}
bool findd(long long x, long long y) { return findpar(x) == findpar(y); }
void unio(long long i, long long j) {
  long long gparx = findpar(i);
  long long gpary = findpar(j);
  parent[gparx] = parent[gpary];
}
int main() {
  long long n;
  cin >> n;
  long long A[n];
  long long B[n];
  for (long long i = 0; i < n; i++) {
    parent[i] = i;
  }
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
  }
  for (long long i = 0; i < n; i++) {
    cin >> B[i];
    if (B[i] + i < n) {
      unio(i, B[i] + i);
    }
    if (i - B[i] >= 0) {
      unio(i, i - B[i]);
    }
  }
  for (long long i = 0; i < n; i++) {
    if (!findd(A[i] - 1, i)) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
