#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int n, p[N], d[N];
bool adj[N][N], vst[N];
void dfs(int u) {
  vst[u] = 1;
  for (int v = 1; v <= n; v++)
    if (!vst[v] && adj[u][v]) {
      dfs(v);
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i];
  for (int i = 1; i <= n; i++) cin >> d[i];
  memset(adj, 0, sizeof(adj));
  for (int i = 1; i <= n; i++) {
    if (i + d[i] <= n) {
      adj[i][i + d[i]] = true;
      adj[i + d[i]][i] = true;
    }
    if (i - d[i] > 0) {
      adj[i][i - d[i]] = true;
      adj[i - d[i]][i] = true;
    }
  }
  bool fl = 1;
  for (int i = 1; i <= n; i++) {
    memset(vst, 0, sizeof(vst));
    dfs(i);
    if (!vst[p[i]]) return (cout << "NO\n", 0);
  }
  cout << "YES\n";
  return 0;
}
