#include <bits/stdc++.h>
using namespace std;
const int N = 110;
using l2 = long long;
int n, per[N], f[N], now[N], cnt, vis[N], pos[N];
vector<int> v[N], v2;
void dfs(int s) {
  vis[s] = 1;
  v2.push_back(s);
  for (auto i : v[s]) {
    if (!vis[i]) dfs(i);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> per[i];
    --per[i];
    pos[per[i]] = i;
    now[i] = i;
  }
  for (int i = 0; i < n; i++) cin >> f[i];
  for (int i = 0; i < n; i++) {
    if ((i + f[i]) < n) {
      v[now[i]].push_back(i + f[i]);
      v[i + f[i]].push_back(now[i]);
    }
    if ((i - f[i]) >= 0) {
      v[now[i]].push_back(i - f[i]);
      v[i - f[i]].push_back(now[i]);
    }
  }
  string ss = "YES";
  for (int i = 0; i < n; i++) {
    if (!vis[i]) {
      dfs(i);
      for (auto i : v2) {
        if (!vis[per[i]]) ss = "NO";
      }
      memset(vis, 0, sizeof vis);
      v2.clear();
    }
  }
  cout << ss << endl;
}
