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