#include <bits/stdc++.h>
using namespace std;
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
T ModInv(T b, T m) {
  return BigMod(b, m - 2, m);
}
template <typename T>
T POW(T B, T printf) {
  if (printf == 0) return 1;
  if (printf & 1)
    return B * POW(B, printf - 1);
  else
    return SQR(POW(B, printf / 2));
}
template <typename T>
long long int isLeft(T a, T b, T c) {
  return (a.x - b.x) * (b.y - c.y) - (b.x - c.x) * (a.y - b.y);
}
template <class T>
inline T bigmod(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T bpow(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
int ts, kk = 1;
long long int n;
long long int r;
long long int ln[200005], tmd[200005];
vector<long long int> v;
long long int sz;
int main() {
  long long int t, i, j, k;
  scanf("%lld%lld", &n, &r);
  for (i = 0; i < n; i++) scanf("%lld", &ln[i]);
  for (i = 0; i < n; i++) scanf("%lld", &tmd[i]);
  sz = 0;
  long long int pv = 0;
  long long int id = 0;
  for (i = 0; i < n; i++) {
    if (ln[i] > tmd[i]) {
      printf("-1\n");
      return 0;
    }
    if (pv >= ln[i]) {
      id += ln[i];
      pv = pv - ln[i];
      continue;
    }
    t = (ln[i] - pv);
    k = tmd[i] - pv;
    long long int lo, hi, md, rs = t + 1;
    lo = 0;
    hi = t;
    while (lo <= hi) {
      md = (lo + hi) >> 1;
      if (md + (t - md) * 2 <= k) {
        rs = md;
        hi = md - 1;
      } else
        lo = md + 1;
    }
    if (rs > t) {
      printf("-1\n");
      return 0;
    }
    id += pv + rs + (t - rs) * 2;
    long long int q = (rs + r - 1) / r, l;
    long long int p;
    if (rs % r)
      p = id - rs % r;
    else
      p = id - r;
    sz += q;
    if (sz <= 100000LL)
      for (l = 0; l < q; l++, p -= r) {
        v.push_back(p);
      }
    if (rs % r)
      pv = r - rs % r;
    else
      pv = 0;
  }
  printf("%lld\n", sz);
  if (sz && sz <= 100000LL) {
    sort(v.begin(), v.end());
    assert(v[0] >= 0);
    printf("%lld", v[0]);
    for (i = 1; i < sz; i++) printf(" %lld", v[i]);
  }
  puts("");
  return 0;
}
