#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
long long n, r, l[200005], t[200005], x[200005];
bool canReach() {
  for (long long i = 1; i <= n; i++)
    if (l[i] > t[i] * 2) return false;
  return true;
}
void drink(long long t, long long num) {
  for (long long i = 0; i <= num - 1; i++) cout << t + i * r << " ";
}
long long solve(long long output) {
  long long ans = 0;
  x[0] = 0;
  for (long long i = 1; i <= n; i++) x[i] = x[i - 1] + l[i];
  long long pos = 0, nex = 1, T = 0;
  double tim = t[1];
  while (pos < x[n]) {
    long long dis = x[nex] - pos;
    if (dis <= tim) {
      pos = x[nex];
      T += dis;
      nex++;
      tim = t[nex];
    } else {
      long long T_ = floor(T + 2 * tim - x[nex] + pos + eps);
      long long tmp = (long long)tim;
      if (tim - tmp > eps) tmp++;
      long long num = (T + tmp - T_ + r - 1) / r;
      if (output) drink(T_, num);
      ans += num;
      pos += T_ - T + num * r * 2;
      T = T_ + num * r;
      while (nex <= n && pos >= x[nex]) nex++;
      if (nex <= n) {
        tim = t[nex] - (pos - x[nex - 1]) * 1.0 / 2;
      }
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  while (cin >> n >> r) {
    for (long long i = 1; i <= n; i++) cin >> l[i], l[i] *= 2;
    for (long long i = 1; i <= n; i++) cin >> t[i];
    if (!canReach()) {
      cout << "-1" << endl;
      continue;
    }
    long long ans = solve(0);
    cout << ans << endl;
    if (ans <= 100000) solve(1);
    cout << endl;
  }
  return 0;
}
