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