#include <bits/stdc++.h>
using namespace std;
using ll = long long;
vector<pair<ll, ll>> run_length_encoding(vector<ll> s) {
  vector<pair<ll, ll>> res;
  ll n = s.size();
  ll prev = -1;
  ll cur = 1;
  for (ll i = 0; i < n; i++) {
    if (prev == s[i])
      cur++;
    else {
      if (prev != -1) res.push_back({prev, cur});
      prev = s[i];
      cur = 1;
    }
  }
  res.push_back({prev, cur});
  return res;
}
void solve() {
  ll n, t;
  cin >> n >> t;
  vector<ll> a(n), x(n);
  for (long long i = (0); i < (long long)(n); i++) cin >> a[i];
  for (long long i = (0); i < (long long)(n); i++) cin >> x[i];
  for (long long i = (0); i < (long long)(n); i++) {
    if (x[i] < i + 1) {
      cout << "No\n";
      return;
    }
    if (i != n - 1 && x[i] > x[i + 1]) {
      cout << "No\n";
      return;
    }
  }
  auto v = run_length_encoding(x);
  vector<ll> ans;
  ll ptr = 0;
  for (auto [e, len] : v) {
    if (ptr + len != e) {
      cout << "No\n";
      return;
    }
    if (ptr + len != n && len != 1 && a[ptr + len - 1] + 1 == a[ptr + len]) {
      cout << "No\n";
      return;
    }
    if (len != 1) {
      for (long long i = (1); i < (long long)(len); i++) {
        ans.push_back(a[ptr + i] + t);
      }
      ans.push_back(a[ptr + len - 1] + t + 1);
    } else {
      ans.push_back(a[ptr + len - 1] + t);
    }
    ptr += len;
  }
  cout << "Yes\n";
  for (long long i = (0); i < (long long)(n); i++)
    cout << ans[i] << (i == n - 1 ? "\n" : " ");
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
