#include <bits/stdc++.h>
using namespace std;
const int N = 120;
int s[N];
bool p[N][N];
int main() {
  int i, j, k, n, d;
  bool pnt;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> s[i];
    --s[i];
  }
  for (i = 0; i < n; i++) {
    cin >> d;
    p[i][i] = true;
    if (i - d >= 0) {
      p[i][i - d] = p[i - d][i] = true;
    }
    if (i + d < n) {
      p[i][i + d] = p[i + d][i] = true;
    }
  }
  for (k = 0; k < n; k++) {
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        p[i][j] |= p[i][k] && p[k][j];
      }
    }
  }
  pnt = true;
  for (i = 0; pnt && i < n; i++) {
    pnt &= p[i][s[i]];
  }
  if (pnt)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
