#include <bits/stdc++.h>
using namespace std;
int n, f[105], p[105], d[105];
int find(int x) {
  if (f[x] == x) return x;
  return f[x] = find(f[x]);
}
void _union(int x, int y) {
  int xx = find(x), yy = find(y);
  if (xx != yy) f[xx] = yy;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    f[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> d[i];
    if (i > d[i]) _union(i, i - d[i]);
    if (i + d[i] <= n) _union(i, i + d[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (find(i) != find(p[i])) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
