#include <bits/stdc++.h>
using namespace std;
int n;
const int maxint = 105;
int a[maxint], d[maxint];
void myinit_dfs() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> d[i];
}
bool used[maxint];
void go_dfs(int x) {
  used[x] = true;
  for (int i = 1; i <= n; i++) {
    if (abs(x - i) == d[i] || abs(x - i) == d[x]) {
      if (!used[i]) go_dfs(i);
    }
  }
}
int main() {
  myinit_dfs();
  for (int i = 1; i <= n; i++) {
    memset(used, 0, sizeof(used));
    go_dfs(i);
    for (int j = 1; j <= n; j++) {
      if (!used[j] && a[j] == i) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
