#include <bits/stdc++.h>
using namespace std;
const int MAXSIZE = 100 + 10;
vector<int> adj[MAXSIZE];
bool mark[MAXSIZE];
void DFS(int v) {
  mark[v] = true;
  for (int i = 0; i < (int)adj[v].size(); i++)
    if (!mark[adj[v][i]]) DFS(adj[v][i]);
}
int main() {
  int n, p[MAXSIZE], d;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d);
    if (i - d > 0) {
      adj[i - d].push_back(i);
      adj[i].push_back(i - d);
    }
    if (i + d < n + 1) {
      adj[i + d].push_back(i);
      adj[i].push_back(i + d);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) mark[j] = false;
    DFS(i);
    if (!mark[p[i]]) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
