#include <bits/stdc++.h>
using namespace std;
int n;
int a[111];
vector<int> g[111];
int f[111];
int s;
void dfs(int i) {
  f[i] = s;
  for (int j = 0; j < g[i].size(); j++) {
    if (!f[g[i][j]]) dfs(g[i][j]);
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    int o;
    cin >> o;
    if (i + o <= n) g[i].push_back(i + o), g[i + o].push_back(i);
    if (i - o > 0) g[i].push_back(i - o), g[i - o].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    if (f[i] == 0) {
      s++;
      dfs(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (f[i] != f[a[i]]) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
