#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e2 + 7;
bool mark[MAX];
int n, s[MAX];
vector<int> adj[MAX];
void dfs(int v);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> s[i];
  }
  for (int i = 1; i <= n; ++i) {
    int v;
    cin >> v;
    for (int j = 1; j <= n; ++j) {
      int u = abs(i - j);
      if (u == v) {
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  bool ok = true;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      mark[j] = false;
    }
    dfs(i);
    if (!mark[s[i]]) {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
void dfs(int v) {
  mark[v] = true;
  for (int u : adj[v]) {
    if (!mark[u]) {
      dfs(u);
    }
  }
}
