#include <bits/stdc++.h>
using namespace std;
int N;
long long R;
int L[200005], T[200005];
int LL[200005], TT[200005];
int main() {
  scanf("%d%I64d", &N, &R);
  for (int i = 1; i <= N; i++) scanf("%d", &L[i]), LL[i] = L[i];
  for (int i = 1; i <= N; i++) scanf("%d", &T[i]), TT[i] = T[i];
  bool flag = 0;
  long long resttime = 0, now = 0, ans = 0;
  for (int i = 1; i <= N; i++) {
    if (resttime > 0) {
      long long tc = min(1ll * L[i], resttime);
      L[i] -= tc;
      T[i] -= tc;
      resttime -= tc;
    }
    if (L[i] > T[i]) {
      flag = 1;
      break;
    }
    if (2 * L[i] > T[i]) {
      long long ned = L[i] * 2 - T[i];
      ans += ned / R + (ned % R > 0);
      resttime = (R - ned % R);
      if (resttime == R) resttime = 0;
    }
  }
  if (flag) ans = -1;
  printf("%I64d\n", ans);
  if (ans <= 100000 && ans != -1) {
    resttime = 0;
    for (int i = 1; i <= N; i++) {
      if (resttime > 0) {
        long long tc = min(1ll * LL[i], resttime);
        LL[i] -= tc;
        TT[i] -= tc;
        resttime -= tc;
        now += tc;
      }
      if (2 * LL[i] > TT[i]) {
        long long ned = LL[i] * 2 - TT[i];
        resttime = R - ned % R;
        if (resttime == R) resttime = 0;
        long long cntnow = now + 2ll * (LL[i] - ned);
        for (int i = 1; i <= ned / R + (ned % R > 0); i++) {
          printf("%I64d ", cntnow);
          cntnow += R;
        }
        now += TT[i];
      } else {
        now += 2 * LL[i];
      }
    }
  }
  return 0;
}
