#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &x, T y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
inline bool chkmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
inline void read(long long &x) {
  char ch = getchar();
  int f = 1;
  x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
int n, x[200050];
long long a[200050], b[200050], t;
int main() {
  scanf("%d", &n);
  scanf("%lld", &t);
  for (register int i = 1; i <= n; ++i) scanf("%lld", &a[i]);
  for (register int i = 1; i <= n; ++i) scanf("%d", &x[i]);
  for (register int i = 1; i <= n; ++i)
    if (x[i] < x[i - 1] || x[i] < i) return cout << "No", 0;
  for (register int i = 1; i <= n - 1; ++i)
    b[i] = a[i + 1] + t - !(x[i] == x[i + 1]);
  b[n] = a[n] + t + 1;
  long long cur = n;
  for (register int i = n; i >= 1; --i) {
    if (cur != x[i] || b[i] <= b[i - 1]) return cout << "No", 0;
    if (b[i - 1] - a[i] < t) cur = i - 1;
  }
  cout << "Yes\n";
  for (register int i = 1; i <= n; ++i) cout << b[i] << ' ';
  return 0;
}
