#include <bits/stdc++.h>
using namespace std;
long long a[200005];
long long t[200005];
int n;
long long r;
void work() {
  long long rem = 0, curt = 0, cc, ext, non, j, ans = 0;
  vector<long long> res;
  int i;
  for (i = 1; i <= n; ++i)
    if (a[i] > t[i]) {
      printf("-1\n");
      return;
    }
  for (i = 1; i <= n; ++i) {
    if (a[i] <= rem) {
      rem -= a[i];
      curt += a[i];
      continue;
    }
    if ((a[i] - rem) * 2 + rem <= t[i]) {
      curt += (a[i] - rem) * 2 + rem;
      rem = max(0LL, rem - a[i]);
      continue;
    }
    ext = (a[i] - rem) * 2 + rem - t[i];
    cc = (ext - 1) / r + 1;
    non = a[i] - rem - ext;
    curt += rem + non * 2;
    ans += cc;
    if (ans <= 1e5) {
      for (j = curt; j < curt + ext; j += r) res.push_back(j);
    }
    curt += ext;
    rem = (r - ext % r) % r;
  }
  printf("%I64d\n", ans);
  if (ans <= 1e5)
    for (i = 0; i < res.size(); ++i)
      printf("%I64d%c", res[i], i == res.size() - 1 ? '\n' : ' ');
}
int main() {
  int i;
  scanf("%d%I64d", &n, &r);
  for (i = 1; i <= n; ++i) scanf("%I64d", &a[i]);
  for (i = 1; i <= n; ++i) scanf("%I64d", &t[i]);
  work();
}
