#include <bits/stdc++.h>
using namespace std;
int par[105], vis[105], a[105], b[105], n;
int fin(int x) {
  if (par[x] == x)
    return x;
  else
    return par[x] = fin(par[x]);
}
int unite(int x, int y) { par[fin(x)] = fin(y); }
int sam(int x, int y) { return fin(x) == fin(y); }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    par[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    if (i - b[i] > 0) unite(i, i - b[i]);
    if (i + b[i] <= n) unite(i, i + b[i]);
  }
  for (int i = 1; i <= n; i++) {
    int k = i;
    while (!vis[k]) {
      vis[k] = 1;
      k = a[k];
      if (fin(k) != fin(i)) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
