#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
const int maxn = 200000 + 10;
const long long MAX = 100000;
int n;
long long r;
long long L[maxn], T[maxn];
long long ANS[maxn], pnt = 0;
long long add(long long a, long long b, long long r, long long &ans) {
  long long tot = (b - a + r - 1) / r;
  if (tot + pnt > MAX)
    pnt = MAX + 1;
  else {
    for (int i = 0; i < tot; ++i) ANS[pnt++] = a + r * i;
  }
  ans += tot;
  return tot * r - (b - a);
}
void bad() {
  cout << -1 << '\n';
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> r;
  for (int i = 0; i < n; ++i) cin >> L[i];
  for (int i = 0; i < n; ++i) cin >> T[i];
  long long acc = 0;
  long long ans = 0;
  long long curmoment = 0;
  for (int i = 0; i < n; ++i) {
    long long l = L[i], t = T[i];
    if (t < l) bad();
    long long d = min(acc, l);
    l -= d;
    t -= d;
    acc -= d;
    curmoment += d;
    if (l == 0) continue;
    if (2 * l <= t) {
      curmoment += 2 * l;
      continue;
    }
    acc = add(curmoment + 2 * (t - l), curmoment + t, r, ans);
    curmoment += t;
  }
  cout << ans << '\n';
  if (pnt <= MAX) {
    for (int i = 0; i < pnt; ++i) cout << ANS[i] << " "[i + 1 == pnt];
  }
  return 0;
}
