#include <bits/stdc++.h>
using namespace std;
int n;
int a[1205], d[1205], pset[1205];
int find(int pos) {
  if (pset[pos] == pos)
    return pos;
  else
    return pset[pos] = find(pset[pos]);
}
void join(int x, int y) {
  int rx = find(x);
  int ry = find(y);
  pset[rx] = ry;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) pset[i] = i;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int j = 1; j <= n; j++) {
    cin >> d[j];
    if (j - d[j] > 0) join(j, j - d[j]);
    if (j + d[j] <= n) join(j, j + d[j]);
  }
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    if (find(a[i]) != find(i)) flag = 1;
  }
  if (flag == 1)
    cout << "NO";
  else
    cout << "YES";
}
