#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
unsigned long long x[N], a[N], b[N], t, l;
int main() {
  int i, j, k, n;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> t;
  for (i = 1; i <= n; ++i) cin >> a[i];
  for (i = 1; i <= n; ++i) {
    cin >> x[i];
    if (x[i] < i) {
      cout << "No";
      return 0;
    }
  }
  l = 0;
  for (i = 1; i <= n; ++i) {
    b[i] = max(b[i], a[i] + t);
    l = max(x[i], l);
    if (l > i) b[i] = max(b[i], a[i + 1] + t);
    if (i != 1) b[i] = max(b[i], b[i - 1] + 1);
  }
  for (i = 1; i <= n; ++i)
    if (x[i] != n && (b[x[i]] >= a[x[i] + 1] + t)) {
      cout << "No";
      return 0;
    }
  cout << "Yes\n";
  for (i = 1; i <= n; ++i) cout << b[i] << ' ';
}
