#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 200000;
const int MAXRET = 100000;
int n;
long long tdrink;
int len[MAXN];
int tmx[MAXN];
long long nret, ret[MAXRET];
bool solve() {
  nret = 0;
  long long t = 0;
  long long rem = 0;
  for (int i = (0); i < (n); ++i) {
    if (tmx[i] < len[i]) return false;
    if (rem >= len[i]) {
      t += len[i];
      rem -= len[i];
      continue;
    }
    if (rem + 2 * (len[i] - rem) <= tmx[i]) {
      t += rem + 2 * (len[i] - rem);
      rem = 0;
      continue;
    }
    int exceed = rem + 2 * (len[i] - rem) - tmx[i];
    int nfull = exceed / tdrink, nlast = exceed % tdrink;
    for (int j = 0; j < nfull && nret + j < MAXRET; ++j)
      ret[nret + j] = t + rem + tdrink * j;
    nret += nfull;
    if (nlast != 0) {
      if (nret < MAXRET) ret[nret] = t + tmx[i] - nlast;
      ++nret;
      rem = tdrink - nlast;
    } else
      rem = 0;
    t += tmx[i];
  }
  return true;
}
void run() {
  scanf("%d%lld", &n, &tdrink);
  for (int i = (0); i < (n); ++i) scanf("%d", &len[i]);
  for (int i = (0); i < (n); ++i) scanf("%d", &tmx[i]);
  if (!solve()) {
    printf("-1\n");
    return;
  }
  printf("%lld\n", nret);
  if (nret <= MAXRET) {
    for (int i = (0); i < (nret); ++i) {
      if (i != 0) printf(" ");
      printf("%lld", ret[i]);
    }
    puts("");
  }
}
int main() {
  run();
  return 0;
}
