#include <bits/stdc++.h>
using namespace std;
int g[111];
int find(int x) {
  if (g[x] == x)
    return x;
  else
    return g[x] = find(g[x]);
}
int unio(int x, int y) { g[find(x)] = find(g[y]); }
int n;
int a[111], fav[111];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) g[i] = i;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> fav[i];
  for (int i = 1; i <= n; i++) {
    if (i + fav[i] <= n) unio(i, i + fav[i]);
    if (i - fav[i] > 0) unio(i, i - fav[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (find(i) != find(a[i])) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
