#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 15;
long long a[N];
int x[N];
long long ret[N];
void solve() {
  int n;
  long long t;
  scanf("%d %lld", &n, &t);
  for (int i = 1; i <= n; ++i) scanf("%lld ", &a[i]);
  for (int i = 1; i <= n; ++i) scanf("%d", &x[i]);
  for (int i = 1; i < n; ++i) {
    if (x[i] > x[i + 1]) {
      printf("No\n");
      return;
    }
  }
  int pos = 0;
  for (int i = 1; i <= n;) {
    int j;
    for (j = i; j <= n; ++j) {
      if (x[j] != x[i]) {
        break;
      }
    }
    if (j - 1 != x[i] || ret[i - 1] >= a[i] + t) {
      printf("No\n");
      return;
    }
    for (int k = i; k < j; ++k) {
      if (k == j - 1) {
        ret[k] = max(ret[k - 1] + 1, a[k] + t);
      } else {
        ret[k] = max(ret[k - 1] + 1, a[k + 1] + t);
      }
    }
    i = j;
  }
  printf("Yes\n");
  for (int i = 1; i <= n; ++i) {
    printf("%lld ", ret[i]);
  }
  putchar('\n');
}
int main() {
  solve();
  return 0;
}
