#include <bits/stdc++.h>
using namespace std;
int en[101], fa[101];
int n;
int getfa(int x) {
  if (x != fa[x]) return fa[x] = getfa(fa[x]);
  return fa[x];
}
void init() {
  for (int i = 1; i <= n; i++) fa[i] = i;
}
int main() {
  cin >> n;
  init();
  for (int i = 1; i <= n; i++) cin >> en[i];
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (i + x <= n) {
      int fx = getfa(i);
      int fy = getfa(i + x);
      if (fx != fy) fa[fy] = fx;
    }
    if (i - x >= 1) {
      int fx = getfa(i);
      int fy = getfa(i - x);
      if (fx != fy) fa[fy] = fx;
    }
  }
  bool fg = true;
  for (int i = 1; i <= n; i++) {
    if (getfa(i) != getfa(en[i])) fg = false;
  }
  if (fg)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
