#include <bits/stdc++.h>
using namespace std;
int n, a[101], b[101], us[101];
vector<int> v[101];
void dfs(int x) {
  us[x] = 1;
  for (int i = 0; i < v[x].size(); i++)
    if (!us[v[x][i]]) dfs(v[x][i]);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (abs(i - j) == b[i]) v[i].push_back(j), v[j].push_back(i);
  for (int i = 1; i <= n; i++) {
    memset(us, 0, sizeof(us));
    dfs(i);
    if (!us[a[i]]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
