#include <bits/stdc++.h>
using namespace std;
const double TOLL = 1e-9;
bool edge[101][101];
int arr[101];
int d[101];
int n;
int main() {
  while (cin >> n) {
    memset(edge, false, sizeof edge);
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      --arr[i];
    }
    for (int i = 0; i < n; i++) cin >> d[i];
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        if (abs(i - j) == d[i]) {
          edge[i][j] = true;
          edge[j][i] = true;
        }
    for (int i = 0; i < n; i++) edge[i][i] = true;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++)
        for (int k = 0; k < n; k++)
          edge[j][k] = edge[j][k] || (edge[j][i] && edge[i][k]);
    bool ok = true;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++)
        if (arr[j] == i && !edge[i][j]) ok = false;
    }
    if (!ok)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
