#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long t[N], l[N];
int main() {
  int n;
  long long r;
  scanf("%d %lld", &n, &r);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &l[i]);
  }
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &t[i]);
  }
  for (int i = 0; i < n; ++i) {
    if (t[i] < l[i]) {
      puts("-1");
      return 0;
    }
  }
  vector<long long> ans;
  long long curr_time = 0;
  long long need = 0;
  long long sobrou = 0;
  for (int i = 0; i < n; ++i) {
    if (sobrou >= l[i]) {
      sobrou -= l[i];
      continue;
    }
    l[i] -= sobrou;
    t[i] -= sobrou;
    sobrou = 0;
    long long walking = min(l[i], t[i] - l[i]);
    l[i] -= walking;
    assert(l[i] >= 0);
    long long x = (l[i] + r - 1) / r;
    assert(x >= 0);
    need += x;
    long long running = x * r;
    if (running > l[i]) {
      sobrou = running - l[i];
    }
    if (need < N) {
      for (int j = 0; j < x; ++j) {
        long long y = curr_time + r * j + walking * 2;
        assert(y < curr_time + t[i]);
        ans.push_back(y);
      }
    }
    curr_time += running + walking * 2;
  }
  printf("%lld\n", need);
  if (need <= 100000) {
    for (int i = 0; i < ans.size(); ++i) {
      if (i != 0) printf(" ");
      printf("%lld", ans[i]);
    }
    puts("");
  }
  return 0;
}
