#include <bits/stdc++.h>
using namespace std;
int n;
long long cnt, g;
double w[200005], rt, r, l[200005], t[200005], tt, mt;
bool ok = true;
queue<double> mq;
int main() {
  scanf("%d%lf", &n, &r);
  for (int i = 0; i < n; i++) scanf("%lf", &l[i]);
  for (int i = 0; i < n; i++) {
    scanf("%lf", &t[i]);
    if (t[i] < l[i]) ok = false;
    w[i] = 2 * l[i] - t[i];
  }
  if (ok) {
    for (int i = 0; i < n; i++) {
      if (l[i] >= rt) {
        mt += rt;
        w[i] -= rt;
        l[i] -= rt;
        rt = 0;
      } else {
        w[i] = 0;
        mt += l[i];
        rt -= l[i];
        l[i] = 0;
      }
      mt += 2 * (l[i] - max(w[i], 0.0));
      while (w[i] > 0) {
        if (cnt <= 100000 || w[i] < r) {
          cnt++;
          if (cnt <= 100000) mq.push(mt);
          rt = r;
          if (rt > w[i]) {
            mt += w[i];
            rt -= w[i];
            w[i] = 0;
          } else {
            mt += rt;
            w[i] -= rt;
            rt = 0;
          }
        } else {
          g = w[i] / r;
          cnt += g;
          w[i] -= r * g;
        }
      }
    }
    printf("%I64d\n", cnt);
    if (cnt <= 1e5) {
      while (!mq.empty()) {
        printf("%.0lf ", mq.front());
        mq.pop();
      }
    }
  } else
    printf("-1");
  return 0;
}
