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