#include <bits/stdc++.h>
using namespace std;
const long long sz = 2e5 + 5;
long long a[sz], x[sz], b[sz];
vector<pair<long long, long long> > v;
void solve() {
  long long n, t;
  cin >> n >> t;
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (long long i = 0; i < n; ++i) {
    cin >> x[i];
    v.push_back(make_pair(x[i], i));
  }
  for (long long i = 0; i < n - 1; ++i) {
    if (x[i] > x[i + 1]) {
      cout << "No";
      return;
    }
  }
  for (long long i = 0; i < n; ++i) {
    if (i + 1 > x[i]) {
      cout << "No";
      return;
    }
  }
  long long prev = 0;
  for (long long i = 0; i < n; ++i) {
    b[i] = max(prev + 1, a[min(x[i] - 1, i + 1)] + t);
    prev = b[i];
  }
  if (x[n - 1] != n) {
    cout << "No";
    return;
  }
  for (long long i = 0; i < n; ++i) {
    if (x[i] != n && b[x[i] - 1] - a[x[i]] >= t) {
      cout << "No";
      return;
    }
  }
  cout << "Yes\n";
  for (long long i = 0; i < n; ++i) {
    cout << b[i] << ' ';
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
