#include <bits/stdc++.h>
using namespace std;
const long long N = 2 * 1e5 + 10;
long long INF = 100000000;
long long n, t, a[N], x[N], b[N];
int main() {
  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[n] = a[n] + t + INF;
  for (int i = n - 1; i >= 1; i--) {
    b[i] = a[i + 1] + t - (i == x[i]);
  }
  for (int i = 1; i < n; i++) {
    if (b[i] == b[i + 1] || (x[i] < x[i + 1] && x[i] != i)) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes" << '\n';
  for (int i = 1; i <= n; i++) {
    cout << b[i] << " ";
  }
}
