#include <bits/stdc++.h>
using namespace std;
int n, a[1000010], b[1000010], bin[1000010];
int cha(int x) {
  if (bin[x] != x) bin[x] = cha(bin[x]);
  return bin[x];
}
int heb(int x, int y) {
  int c = cha(x), d = cha(y);
  if (c != d) bin[c] = d;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], bin[i] = i;
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    if (i - b[i] >= 1) heb(i, i - b[i]);
    if (i + b[i] <= n) heb(i, i + b[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (cha(i) != cha(a[i])) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
