#include <bits/stdc++.h>
using namespace std;
long long a[200005], x[200005], c[200005], b[200005], d[200005];
int main() {
  long long n, t;
  cin >> n >> t;
  for (int i = 1; i <= n; i++) cin >> a[i];
  memset(c, 0, sizeof(c));
  d[0] = 0;
  int f = 0;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    f += x[i];
    if (x[i] + 1 <= i + 1) continue;
    c[x[i] + 1]--;
    c[i + 1]++;
  }
  for (int i = 1; i <= n; i++) {
    d[i] = d[i - 1] + c[i];
  }
  d[1]++;
  for (int i = 0; i <= n; i++)
    if (x[i] < i) {
      cout << "No";
      return 0;
    }
  for (int i = 1; i < n; i++) {
    if (x[i + 1] - x[i] < 0) {
      cout << "No";
      return 0;
    }
  }
  b[1] = a[1] + t;
  b[0] = 0;
  for (int i = 2; i <= n; i++) {
    if ((d[i - 1] && d[i] == d[i - 1] + 1) || (!d[i - 1] && d[i]) ||
        (i == 2 && d[i])) {
      b[i - 1] = max(b[i - 2] + 1, a[i] + t);
    } else if (!d[i]) {
      if (b[i - 2] + 1 > a[i] + t - 1) {
        cout << "No";
        return 0;
      }
      b[i - 1] = max(b[i - 2] + 1, a[i - 1] + t);
    } else {
      cout << "No";
      return 0;
    }
  }
  b[n] = a[n] + t + 1;
  cout << "Yes" << endl;
  for (int i = 1; i <= n; i++) cout << b[i] << " ";
}
