#include <bits/stdc++.h>
using namespace std;
int w[102][102];
int a[102];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    w[i][i] = 1;
    if (i - x > 0) w[i - x][i] = w[i][i - x] = 1;
    if (i + x <= n) w[i + x][i] = w[i][i + x] = 1;
  }
  for (int k = 1; k <= n; k++)
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++)
        if (w[i][k] && w[k][j]) w[i][j] = 1;
  for (int i = 1; i <= n; i++) {
    if (w[i][a[i]] == 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
