func_code_string: #include <bits/stdc++.h>   using namespace std;   char gc() {     static char buf[100000], *p1 = buf, *p2 = buf;     return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)                ? EOF                : *p1++;   }   long long read() {     char ch = getchar();     long long x = 0;     int op = 1;     for (; !isdigit(ch); ch = getchar())       if (ch ==  - ) op = -1;     for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch -  0 ;     return x * op;   }   long long n, t, a[200005], b[200005], x[200005], tg[200005];   int main() {     n = read(), t = read();     for (int i = (1); i <= (n); i++) a[i] = read();     for (int i = (1); i <= (n); i++) {       x[i] = read();       if (x[i] < i) return puts( No ), 0;     }     for (int i = (1); i <= (n); i++) b[i] = a[i] + t;     for (int i = (1); i <= (n); i++)       if (x[i] > i) tg[i]++, tg[x[i]]--;     for (int i = (1); i <= (n); i++) {       tg[i] += tg[i - 1];       b[i] = max(b[i], b[i - 1] + 1);       if (tg[i]) b[i] = max(b[i], a[i + 1] + t);     }     for (int i = (1); i <= (n); i++)       if (x[i] + 1 <= n)         if (b[x[i]] - a[x[i] + 1] >= t) return puts( No ), 0;     puts( Yes );     for (int i = (1); i <= (n); i++) cout << b[i] <<    ;     return 0;   }   