#include <bits/stdc++.h>
using namespace std;
const int N = 300010;
int n, l[N], t[N];
long long r, dv, res, tcur;
vector<long long> ans;
void solve(int l, int t) {
  if (2 * l <= t) {
    tcur += 2 * l;
    return;
  }
  long long x = t - l;
  long long tmp = (1ll * l - x + r - 1) / r;
  res += tmp;
  dv = x + tmp * r - l;
  tcur += 2 * x;
  long long t1 = tcur;
  while (ans.size() < 1e5 + 10 && tmp) {
    ans.push_back(t1);
    tmp--;
    t1 += r;
  }
  tcur += l - x;
}
int main() {
  cin >> n >> r;
  for (int i = 1; i <= n; i++) cin >> l[i];
  for (int i = 1; i <= n; i++) cin >> t[i];
  res = 0;
  dv = 0;
  tcur = 0;
  for (int i = 1; i <= n; i++) {
    if (l[i] > t[i]) {
      res = -1;
      break;
    }
    if (l[i] <= dv) {
      dv -= l[i];
      tcur += l[i];
      continue;
    }
    l[i] -= dv;
    t[i] -= dv;
    tcur += dv;
    dv = 0;
    solve(l[i], t[i]);
  }
  cout << res << endl;
  if (res != -1 && ans.size() <= 1e5) {
    assert(res == ans.size());
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
