#include <bits/stdc++.h>
using namespace std;
int n, in[100];
bool e[100][100];
void run() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) e[i][j] = i == j;
  for (int i = 0; i < n; i++) scanf("%d", in + i);
  for (int i = 0; i < n; i++) {
    int d;
    scanf("%d", &d);
    int a = i + d, b = i - d;
    if (0 <= a && a < n) e[i][a] = e[a][i] = 1;
    if (0 <= b && b < n) e[i][b] = e[b][i] = 1;
  }
  for (int k = 0; k < n; k++)
    for (int i = 0; i < n; i++)
      for (int j = 0; j < n; j++) e[i][j] |= e[i][k] && e[k][j];
  bool ok = 1;
  for (int i = 0; i < n; i++)
    if (!e[i][in[i] - 1]) ok = 0;
  puts(ok ? "YES" : "NO");
}
int main() {
  run();
  return 0;
}
