#include <bits/stdc++.h>
using namespace std;
int curComp;
bool vis[105];
bool adj[105][105];
int compVertex[105], compNumber[105], n, x;
int want[105];
void dfs(int cur) {
  if (cur <= 0 || cur > n) return;
  if (vis[cur]) return;
  vis[cur] = true;
  compVertex[cur] = curComp;
  for (int i = 1; i <= n; i++) {
    if (adj[cur][i]) dfs(i);
  }
}
int main() {
  ios::sync_with_stdio(false);
  curComp = 0;
  memset(vis, false, sizeof vis);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> want[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (i - x > 0) adj[i][i - x] = adj[i - x][i] = true;
    if (i + x <= n) adj[i][i + x] = adj[i + x][i] = true;
  }
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      ++curComp;
      dfs(i);
    }
  }
  bool ok = true;
  for (int i = 1; i <= n && ok; i++) {
    if (compVertex[want[i]] != compVertex[i]) ok = false;
  }
  cout << (ok ? "YES" : "NO") << endl;
  return 0;
}
