#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int n, par[N], p[N], d;
int find(int x) { return par[x] < 0 ? x : par[x] = find(par[x]); }
bool same(int x, int y) { return find(x) == find(y); }
void uni(int x, int y) {
  if (same(x, y)) return;
  par[find(x)] = find(y);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    par[i] = -1;
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    cin >> d;
    if (i + d <= n) uni(i, i + d);
    if (i - d >= 1) uni(i, i - d);
  }
  for (int i = 1; i <= n; i++)
    if (!same(i, p[i])) return (cout << "NO\n", 0);
  cout << "YES\n";
  return 0;
}
