#include <bits/stdc++.h>
using namespace std;
int p[101];
int d[101];
int vis[101];
vector<int> adj[101];
void dfs(int idx) {
  vis[idx] = 1;
  for (int i = 0; i < adj[idx].size(); i++) {
    if (!vis[adj[idx][i]]) {
      dfs(adj[idx][i]);
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &d[i]);
    d[i]--;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i]);
  }
  for (int i = 0; i < n; i++) {
    if ((i + p[i]) < n) {
      adj[i].push_back(i + p[i]);
      adj[i + p[i]].push_back(i);
    }
    if ((i - p[i]) >= 0) {
      adj[i].push_back(i - p[i]);
      adj[i - p[i]].push_back(i);
    }
  }
  for (int i = 0; i < n; i++) {
    memset(vis, 0, sizeof vis);
    dfs(i);
    if (!vis[d[i]]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
