#include <bits/stdc++.h>
using namespace std;
long long a[200001], t[200001], r;
int n;
int main() {
  scanf("%d %lld", &n, &r);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    a[i] <<= 1;
  }
  for (int i = 1; i <= n; i++) scanf("%lld", &t[i]);
  for (int i = 1; i <= n; i++) {
    if (a[i] > 2LL * t[i]) {
      puts("-1");
      return 0;
    }
  }
  int cur = 1;
  long long rem = 0, curt = 0;
  long long res = 0;
  vector<long long> v;
  while (cur <= n) {
    long long use = min(rem, a[cur] / 2);
    a[cur] -= use * 2;
    t[cur] -= use;
    curt += use;
    rem -= use;
    if (a[cur] <= t[cur]) {
      curt += a[cur];
      cur++;
      continue;
    }
    long long lo = 0, hi = a[cur] / r + 100;
    while (lo + 1 < hi) {
      long long mid = (lo + hi) / 2;
      if (mid * r * 2LL + (max(0LL, t[cur] - mid * r)) >= a[cur])
        hi = mid;
      else
        lo = mid;
    }
    long long eat = hi;
    res += eat;
    lo = 0;
    hi = t[cur];
    while (lo + 1 < hi) {
      long long mid = (lo + hi) / 2;
      if (mid + (t[cur] - mid) * 2LL >= a[cur])
        lo = mid;
      else
        hi = mid;
    }
    if ((long long)v.size() + eat <= 100000LL) {
      for (long long i = lo, cnt = 0; cnt < eat; i += r, cnt++)
        v.push_back(curt + i);
    }
    a[cur] -= lo;
    t[cur] -= lo;
    curt += lo + a[cur] / 2;
    rem += ((eat * r) - a[cur] / 2);
    cur++;
  }
  printf("%lld\n", res);
  if (res <= 100000LL) {
    for (int i = 0; i < v.size(); i++) printf("%lld ", v[i]);
    puts("");
  }
}
