#include <bits/stdc++.h>
using namespace std;
int n;
int a[100];
int d[100];
bool dis[100][100];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  for (int i = 0; i < n; i++) {
    dis[i][i] = 1;
    cin >> d[i];
    if (i - d[i] >= 0) {
      dis[i][i - d[i]] = 1;
      dis[i - d[i]][i] = 1;
    }
    if (i + d[i] < n) {
      dis[i][i + d[i]] = 1;
      dis[i + d[i]][i] = 1;
    }
  }
  for (int k = 0; k < n; k++) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        dis[i][j] |= dis[i][k] & dis[k][j];
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (!dis[i][a[i]]) {
      cout << "NO\n";
      exit(0);
    }
  }
  cout << "YES\n";
  return 0;
}
