#include <bits/stdc++.h>
using namespace std;
int n, a[112], par[112], sz[112];
vector<int> ad[100];
int getpar(int x) { return par[x] == -1 ? x : par[x] = getpar(par[x]); }
void merge(int x, int y) {
  x = getpar(x);
  y = getpar(y);
  if (x != y) {
    if (sz[x] > sz[y]) swap(x, y);
    par[x] = y;
    sz[y] += sz[x];
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    par[i] = -1;
    sz[i] = 1;
  }
  for (int i = 1; i <= n; i++) {
    int b;
    cin >> b;
    if (i > b) merge(i, i - b);
    if (n >= i + b) merge(i, i + b);
  }
  for (int i = 1; i <= n; i++) {
    if (getpar(i) != getpar(a[i])) return cout << "NO", 0;
  }
  cout << "YES";
  return 0;
}
