#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ret = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while ('0' <= ch && ch <= '9') {
    ret = ret * 10 - 48 + ch;
    ch = getchar();
  }
  return ret;
}
vector<long long> ans;
long long res;
int n, l[200005], t[200005];
int main() {
  n = read();
  long long r;
  scanf("%lld", &r);
  for (int i = 1; i <= n; ++i) l[i] = read();
  for (int i = 1; i <= n; ++i)
    if (l[i] > (t[i] = read())) {
      puts("-1");
      return 0;
    }
  ans.clear();
  long long left = 0, now = 0;
  res = 0;
  for (int i = 1; i <= n; ++i) {
    int s = l[i], dlt = l[i];
    if (left && dlt >= left)
      dlt -= left, left = 0;
    else if (left > dlt)
      left -= dlt, dlt = 0;
    if (s + dlt <= t[i]) {
      now += s + dlt;
      continue;
    }
    long long cnt = (s + dlt - t[i]) / r;
    res += cnt;
    for (int j = 0; j < cnt && ans.size() < 1e5; ++j)
      ans.push_back(now + (s - dlt) + j * r);
    dlt -= cnt * r;
    if (s + dlt - t[i]) {
      left = r - (s + dlt - t[i]);
      ++res;
      if (ans.size() < 1e5) ans.push_back(now + t[i] - (s + dlt - t[i]));
    }
    now += t[i];
  }
  printf("%I64d\n", res);
  if (res <= 1e5) {
    for (int i = 0; i < res; ++i) {
      printf("%I64d", ans[i]);
      if (i == res - 1)
        puts("");
      else
        putchar(' ');
    }
  }
  return 0;
}
