#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int MAXN = 200005;
int n, x[MAXN];
long long a[MAXN], t;
long long b[MAXN];
void solve() {
  for (int i = 0; i + 1 < n; i++) {
    if (x[i] > x[i + 1]) {
      cout << "No" << endl;
      return;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i > x[i]) {
      cout << "No" << endl;
      return;
    }
  }
  for (int i = 0; i < n;) {
    int pos = x[i];
    int j = i;
    while (j < n && x[j] == pos) {
      j++;
    }
    if (j < x[i] + 1) {
      cout << "No" << endl;
      return;
    }
    long long num = a[j - 1];
    for (int k = i; k + 1 < j; k++) {
      b[k] = a[k + 1] + t;
    }
    b[j - 1] = a[j - 1] + t + (j - i > 1);
    if (j < n && b[j - 1] >= a[j] + t) {
      cout << "No" << endl;
      return;
    }
    i = j;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) {
    cout << b[i] << ' ';
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  while (cin >> n >> t) {
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      cin >> x[i];
      x[i]--;
    }
    solve();
  }
}
