#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void chkmax(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
inline void chkmin(T& x, U y) {
  if (y < x) x = y;
}
const int MAXN = 222222;
long long l[MAXN], t[MAXN];
long long s[MAXN];
long long r;
int main() {
  int n;
  int f = 0;
  scanf("%d%lld", &n, &r);
  for (int i = 0; i < n; i++) scanf("%lld", l + i);
  for (int i = 0; i < n; i++) {
    scanf("%lld", t + i);
    if (l[i] > t[i]) f = 1;
  }
  if (f) {
    puts("-1");
    return 0;
  }
  long long k = 1;
  s[0] = 0;
  int pos = 0;
  long long pot = 0;
  long long rem = 0;
  while (pos < n) {
    if (rem >= l[pos]) {
      rem -= l[pos];
      pot += l[pos];
      pos++;
      continue;
    }
    if ((l[pos] - rem) * 2 + rem <= t[pos]) {
      pot += (l[pos] - rem) * 2 + rem;
      pos++;
      rem = 0;
    } else {
      long long x = t[pos] - l[pos], y = -t[pos] - rem + l[pos] * 2;
      k += (y + r - 1) / r;
      rem = (r - (y % r)) % r;
      pos++;
    }
  }
  if (k - 1 > 100000) {
    cout << k - 1 << endl;
    return 0;
  }
  k = 1;
  s[0] = 0;
  pos = 0;
  pot = 0;
  rem = 0;
  while (pos < n) {
    if (rem >= l[pos]) {
      rem -= l[pos];
      pot += l[pos];
      pos++;
      continue;
    }
    if ((l[pos] - rem) * 2 + rem <= t[pos]) {
      pot += (l[pos] - rem) * 2 + rem;
      pos++;
      rem = 0;
    } else {
      long long x = t[pos] - l[pos], y = -t[pos] - rem + l[pos] * 2;
      s[k++] = pot + rem + x * 2;
      y -= r;
      while (y > 0) {
        s[k] = s[k - 1] + r;
        k++;
        y -= r;
      }
      rem = -y;
      pot += t[pos];
      pos++;
    }
  }
  cout << k - 1 << endl;
  for (int i = 1; i < k; i++) printf("%lld%c", s[i], (i < k - 1) ? ' ' : '\n');
  return 0;
}
