#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 10, mod = 1e9 + 7;
int par[N], rnk[N];
int findp(int x) { return (par[x] == x ? x : par[x] = findp(par[x])); }
bool iscon(int x, int y) { return (findp(x) == findp(y)); }
void con(int x, int y) {
  x = findp(x), y = findp(y);
  if (rnk[x] > rnk[y]) swap(x, y);
  par[x] = y;
  if (rnk[x] == rnk[y]) rnk[y]++;
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    par[i] = i, rnk[i] = 1;
  }
  vector<int> v(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (i - x > 0) con(i - x, i);
    if (i + x <= n) con(i + x, i);
  }
  for (int i = 1; i <= n; i++) {
    if (!iscon(i, v[i])) return cout << "NO", 0;
  }
  cout << "YES";
}
