#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int n;
int arr[105];
int fav[105];
int par[105];
void init() {
  for (int i = 1; i <= n; i++) par[i] = i;
}
int get_par(int node) {
  if (par[node] == node)
    return node;
  else
    return par[node] = get_par(par[node]);
}
bool issame(int a, int b) {
  a = get_par(a);
  b = get_par(b);
  return a == b;
}
void Merge(int a, int b) {
  if (issame(a, b)) return;
  a = get_par(a);
  b = get_par(b);
  par[a] = b;
}
int main() {
  scanf("%d", &n);
  init();
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &fav[i]);
    if (i + fav[i] < n) {
      Merge(arr[i], arr[i + fav[i]]);
    }
    if (i - fav[i] >= 0) Merge(arr[i], arr[i - fav[i]]);
    fav[i] = arr[i];
  }
  sort(arr, arr + n);
  for (int i = 0; i < n; i++) {
    if (issame(arr[i], fav[i]))
      continue;
    else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
