#include <bits/stdc++.h>
const double PI = acos(-1.0);
using namespace std;
int setb(int n, int pos) { return n = n | (1 << pos); }
int resb(int n, int pos) { return n = n & ~(1 << pos); }
bool checkb(int n, int pos) { return (bool)(n & (1 << pos)); }
inline long long bigmod(long long b, long long p, long long m) {
  long long ret = 1, cur = b % m;
  while (p) {
    if (p & 1) ret = (ret * cur) % m;
    cur = (cur * cur) % m;
    p = p >> 1;
  }
  return ret;
}
long long n, m, ara[200005], d[200005], marker[200005], sum[200005],
    ans[200005];
void add(long long x, long long y) {
  if (y < x) {
    puts("No");
    exit(0);
  }
  marker[y - 1]++;
  marker[x - 1]--;
}
void build() {
  long long tot = 0;
  for (int i = n; i >= 1; i--) {
    tot += marker[i];
    if (tot)
      sum[i] = 1;
    else
      sum[i] = 0;
  }
}
void solve() {
  long long i, last = 0;
  for (i = 1; i <= n; i++) {
    long long now = max(last + 1, ara[i]);
    if (sum[i]) now = max(now, ara[i + 1]);
    ans[i] = now + m;
    last = now;
  }
}
void check() {
  long long i;
  for (i = 1; i <= n; i++) {
    if (d[i] == n) continue;
    long long nxt_id = d[i] + 1;
    long long his = ara[nxt_id] + m;
    if (ans[nxt_id - 1] >= his) {
      puts("No");
      exit(0);
    }
  }
}
void show() {
  puts("Yes");
  long long i;
  for (i = 1; i <= n; i++) {
    if (i > 1) printf(" ");
    printf("%lld", ans[i]);
  }
  printf("\n");
}
int main() {
  long long i;
  scanf("%lld %lld", &n, &m);
  for (i = 1; i <= n; i++) scanf("%lld", &ara[i]);
  for (i = 1; i <= n; i++) scanf("%lld", &d[i]);
  for (int i = 2; i <= n; i++) {
    if (d[i] < d[i - 1]) {
      puts("No");
      exit(0);
    }
  }
  for (i = 1; i <= n; i++) add(i, d[i]);
  build();
  solve();
  check();
  show();
  return 0;
}
