#include <bits/stdc++.h>
using namespace std;
int n, t[105], f[105];
bool g[105][105];
int main() {
  bool fl = true;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> t[i];
    t[i]--;
  }
  for (int i = 0; i < n; i++) {
    cin >> f[i];
    g[i][i] = true;
    if (i - f[i] >= 0) g[i][i - f[i]] = g[i - f[i]][i] = true;
    if (i + f[i] < n) g[i][i + f[i]] = g[i + f[i]][i] = true;
  }
  for (int k = 0; k < n; k++) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (g[i][k] && g[k][j]) g[i][j] = true;
      }
    }
  }
  for (int i = 0; i < n; i++)
    if (!g[i][t[i]]) fl = false;
  if (fl)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
