#include <bits/stdc++.h>
using namespace std;
const int N = 112345;
int a[N];
int b[N];
vector<int> v[N];
int cmp[N];
priority_queue<int> q[N];
void dfs(int x, int s) {
  cmp[x] = s;
  q[s].push(-a[x]);
  for (int i = 0; i < v[x].size(); i++) {
    int to = v[x][i];
    if (!cmp[to]) dfs(to, s);
  }
}
int main() {
  int n, m, i, j;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    int x = i - b[i];
    if (x >= 1) {
      v[x].push_back(i);
      v[i].push_back(x);
    }
    x = i + b[i];
    if (x <= n) {
      v[x].push_back(i);
      v[i].push_back(x);
    }
  }
  int c = 0;
  for (int i = 1; i <= n; i++) {
    if (!cmp[i]) {
      dfs(i, ++c);
    }
  }
  for (int i = 1; i <= n; i++) {
    int d = -q[cmp[i]].top();
    q[cmp[i]].pop();
    if (d != i) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
}
