#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int MOD = 1e9 + 7;
const long long llinf = 1ll * inf * inf;
const double eps = 1e-12;
const int N = 2e5 + 10;
long long l[N], t[N];
int n;
long long r;
int bad;
vector<long long> ansv;
long long curT = 0;
int LIM = 1e5;
long long f(long long& rem, long long l, long long t) {
  if (l > t) {
    bad = 1;
    return 0;
  };
  if (l <= rem) {
    curT += l;
    rem -= l;
    return 0;
  }
  long long L = l - rem;
  long long T = t - rem;
  curT += rem;
  rem = 0;
  long long need = max(0ll, 2 * L - T);
  long long cnt = (need + r - 1) / r;
  long long inc = (r - need % r) % r;
  long long first = min(T, 2 * L) + inc - cnt * r;
  rem = inc;
  ;
  for (int i = 0; i < cnt && int(ansv.size()) < LIM; ++i) {
    ansv.push_back(curT + first + i * r);
  }
  curT += first + cnt * r - inc;
  return cnt;
}
int main() {
  scanf("%d%lld", &n, &r);
  for (int i = 0; i < int(n); ++i) scanf("%lld", &l[i]);
  for (int i = 0; i < int(n); ++i) scanf("%lld", &t[i]);
  long long ans = 0;
  long long rem = 0;
  bad = 0;
  for (int i = 0; i < int(n); ++i) {
    ans += f(rem, l[i], t[i]);
    if (bad) break;
  }
  if (bad)
    printf("-1\n");
  else {
    printf("%lld\n", ans);
    if (ans <= LIM) {
      sort(ansv.begin(), ansv.end());
      for (int i = 0; i < int(ans); ++i)
        printf("%lld%c", ansv[i], i + 1 == ans ? '\n' : ' ');
    }
  }
}
