#include <bits/stdc++.h>
using namespace std;
bool graph[128][128] = {false};
int main() {
  int n;
  cin >> n;
  vector<int> num(n);
  vector<int> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> num[i];
    num[i]--;
  }
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  for (int i = 0; i < n; i++) {
    graph[i][i] = true;
    int j = i - vec[i];
    int k = i + vec[i];
    if (j >= 0) {
      graph[i][j] = graph[j][i] = true;
    }
    if (k < n) {
      graph[i][k] = graph[k][i] = true;
    }
  }
  for (int k = 0; k < n; k++) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (graph[i][k] && graph[k][j]) {
          graph[i][j] = true;
        }
      }
    }
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (!graph[i][num[i]]) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
