#include <bits/stdc++.h>
using namespace std;
int n;
int a[2000], x[2000], rev[2000], pos[200][200];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), a[i]--, rev[a[i]] = i;
  for (int i = 0; i < n; i++) scanf("%d", &x[i]);
  for (int i = 0; i < n; i++) {
    pos[i][i] = 1;
    for (int j = 0; j < n; j++)
      for (int k = 0; k < n; k++)
        if (pos[i][k]) {
          if (k + x[k] < n) pos[i][k + x[k]] = 1;
          if (k - x[k] >= 0) pos[i][k - x[k]] = 1;
          for (int q = 0; q < n; q++)
            if (q - x[q] == k || q + x[q] == k) pos[i][q] = 1;
        }
  }
  for (int i = 0; i < n; i++)
    if (!pos[i][rev[i]]) {
      puts("NO");
      return 0;
    }
  puts("YES");
  return 0;
}
