#include <bits/stdc++.h>
using namespace std;
const int N = 105;
vector<int> edges[N];
int n, a[N], d[N];
bool vis[N];
bool dfs(int node, int target) {
  if (node == target) return 1;
  vis[node] = 1;
  bool ret = 0;
  for (auto i : edges[node]) {
    if (!vis[i]) ret |= dfs(i, target);
  }
  return ret;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> d[i];
  for (int i = 0; i < n; i++) {
    if (i - d[i] > -1) {
      edges[a[i]].push_back(a[i - d[i]]);
      edges[a[i - d[i]]].push_back(a[i]);
    }
    if (i + d[i] < n) {
      edges[a[i]].push_back(a[i + d[i]]);
      edges[a[i + d[i]]].push_back(a[i]);
    }
  }
  bool ok = 1;
  for (int i = 0; i < n; i++) {
    memset(vis, 0, sizeof vis);
    ok &= (dfs(a[i], i + 1));
  }
  (ok) ? cout << "YES\n" : cout << "NO\n";
  return 0;
}
