#include <bits/stdc++.h>
using namespace std;
const int Mod = 1000000000 + 7;
const int oo = 0x3f3f3f3f;
using pii = pair<int, int>;
using vi = vector<int>;
using LL = long long;
using QMax = priority_queue<int>;
using QMin = priority_queue<int, vector<int>, greater<int>>;
const int N = 200000 + 9;
const LL inf = 1e18 * 2 + 2;
LL a[N], x[N], b[N], n, t;
int cnt[N];
int getsum(int x, int y) { return cnt[y] - cnt[x - 1]; }
int main() {
  scanf("%I64d%I64d", &n, &t);
  for (int i = 1; i <= n; i++) scanf("%I64d", &a[i]);
  ;
  for (int i = 1; i <= n; i++) scanf("%I64d", &x[i]);
  ;
  for (int i = 1; i <= n; i++) {
    if (x[i] < i) {
      return printf("No\n"), 0;
    }
    cnt[i]++;
    cnt[x[i]]--;
  }
  for (int i = 1; i <= n; i++) cnt[i] = cnt[i - 1] + cnt[i];
  LL pre = 0;
  for (int i = 1; i <= n; i++) {
    if (cnt[i]) {
      b[i] = pre + 1;
      if (b[i] < a[i + 1] + t) b[i] = a[i + 1] + t;
    } else {
      b[i] = pre + 1;
      if (b[i] < a[i] + t) b[i] = a[i] + t;
    }
    pre = b[i];
  }
  memset(cnt, 0, sizeof cnt);
  for (int i = 1; i < n; i++) {
    if (a[i + 1] + t > b[i]) cnt[i] = 1;
  }
  for (int i = 1; i <= n; i++) cnt[i] = cnt[i - 1] + cnt[i];
  for (int i = 1; i <= n; i++) {
    if (x[i] == n) continue;
    if (!getsum(i, x[i] + 1)) {
      return printf("No\n"), 0;
    }
  }
  printf("Yes\n");
  for (int i = 1; i <= n; i++) printf("%I64d%c", b[i], " \n"[i == n]);
}
