#include <bits/stdc++.h>
using namespace std;
const long long NMAX = 2e5 + 5;
const long long MOD = 1e9 + 7;
long long n, t, a[NMAX], b[NMAX];
int x[NMAX];
int main() {
  int d = 0;
  cin >> n >> t;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i) cin >> x[i];
  for (int i = 1; i <= n; ++i) {
    if (x[i] < i) {
      cout << "No";
      return 0;
    }
    b[i] = max(b[i], a[i] + t);
    b[x[i]] = max(b[x[i]], a[i] + t);
    for (int j = max(i, d) + 1; j <= x[i]; ++j)
      b[j - 1] = max(b[j - 1], a[j] + t);
    d = x[i];
  }
  for (int i = 1; i <= n; ++i) {
    if (b[i] <= b[i - 1]) {
      b[i] = b[i - 1] + 1;
    }
  }
  for (int i = 1; i <= n - 1; ++i) {
    if (x[i] < n && b[x[i]] - a[x[i] + 1] >= t) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes\n";
  for (int i = 1; i <= n; ++i) cout << b[i] << " ";
  return 0;
}
