#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[101], e[101][101] = {};
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    e[i][i] = 1;
    if (i - tmp >= 1) e[i][i - tmp] = e[i - tmp][i] = 1;
    if (i + tmp <= n) e[i][i + tmp] = e[i + tmp][i] = 1;
  }
  for (int k = 1; k <= n; k++)
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        if (e[i][k] && e[k][j]) e[i][j] = 1;
  for (int i = 1; i <= n; i++)
    if (!e[i][a[i]]) return puts("NO");
  puts("YES");
}
