#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r;
  scanf("%lld%lld", &n, &r);
  vector<long long> l(n), tt(n);
  vector<long long> drinktime;
  long long drinks = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &l[i]);
  }
  for (int i = 0; i < n; i++) {
    scanf("%lld", &tt[i]);
  }
  long long t = 0, tl = 0;
  for (int i = 0; i < n; i++) {
    if (tt[i] < l[i]) {
      puts("-1");
      return 0;
    }
    if (l[i] <= tl) {
      tl -= l[i];
      t += l[i];
      continue;
    }
    if (2 * l[i] - tl <= tt[i]) {
      t += 2 * l[i] - tl;
      tl = 0;
      continue;
    }
    long long k;
    if ((2 * l[i] - tl - tt[i]) % r == 0) {
      k = (2 * l[i] - tl - tt[i]) / r;
      drinks += k;
      if (drinks <= 1e5) {
        for (int j = 0; j < k; j++) {
          drinktime.push_back(t + tl + j * r);
        }
      }
      t = t + tt[i];
      tl = 0;
    } else {
      k = (2 * l[i] - tl - tt[i]) / r;
      drinks += k + 1;
      if (drinks <= 1e5) {
        for (int j = 0; j < k; j++) {
          drinktime.push_back(t + tl + j * r);
        }
        drinktime.push_back(t + tl + k * r + 2 * (tt[i] - l[i]));
      }
      tl = r - (2 * l[i] - tl - r * k - tt[i]);
      t = t + tt[i];
    }
  }
  printf("%lld\n", drinks);
  if (drinks <= 1e5) {
    for (long long ti : drinktime) {
      printf("%lld ", ti);
    }
    printf("\n");
  }
}
