#include <bits/stdc++.h>
using namespace std;
const int iinf = 1e9 + 7;
const long long linf = 1ll << 60;
const double dinf = 1e10;
inline long long read() {
  bool f = 0;
  long long x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return x;
}
inline void scf(int &x) {
  bool f = 0;
  x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return;
}
void scf(int &x, int &y) {
  scf(x);
  return scf(y);
}
void scf(int &x, int &y, int &z) {
  scf(x);
  scf(y);
  return scf(z);
}
const int N = 2e5 + 100;
const int maxsize = 1e5;
int n;
long long cnt;
long long r, tim;
long long l[N], t[N];
vector<long long> ans;
int main() {
  scf(n);
  r = read();
  for (int i = (1); i <= (n); i++) l[i] = read();
  for (int i = (1); i <= (n); i++) t[i] = read();
  for (int i = (1); i <= (n); i++)
    if (l[i] > t[i]) {
      puts("-1");
      return 0;
    }
  for (int i = (1); i <= (n); i++)
    if ((l[i] << 1) > t[i]) {
      long long x = (t[i] - l[i] << 1);
      long long drk = t[i] - x;
      long long need = drk / r;
      if (need * r < drk) need++;
      cnt += need;
      if (cnt <= maxsize) {
        while (need--) ans.push_back(tim + x), x += r;
      } else
        x += need * r;
      long long rmn = x - t[i];
      tim += x;
      i++;
      while (rmn && i <= n) {
        if (rmn >= l[i])
          rmn -= l[i];
        else
          break;
        i++;
      }
      t[i] -= rmn;
      l[i] -= rmn;
      i--;
    } else
      tim += (l[i] << 1);
  printf("%I64d\n", cnt);
  if (cnt <= maxsize)
    for (auto x : ans) printf("%I64d ", x);
  return 0;
}
