#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const long long MOD = 1e9 + 7;
const double eps = 1e-9;
int n;
long long t, a[N], x[N], b[N];
int main() {
  scanf("%d%lld", &n, &t);
  for (int i = 0; i < n; i++) scanf("%lld", a + i);
  for (int i = 0; i < n; i++) {
    scanf("%lld", x + i);
    x[i]--;
    if (x[i] < i || (i && x[i - 1] > x[i]) ||
        (i && x[i - 1] < x[i] && x[i - 1] != i - 1)) {
      puts("No");
      return 0;
    }
  }
  b[n - 1] = a[n - 1] + t + 100;
  for (int i = n - 2; i >= 0; i--) {
    b[i] = a[i + 1] + t - (x[i] == i);
    if (b[i] == b[i + 1]) {
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  for (int i = 0; i < n; i++) printf("%lld ", b[i]);
  puts("");
  return 0;
}
