#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 15;
long long pos[N], l[N], t[N], n, r;
void solve() {
  cin >> n >> r;
  int i;
  for (i = 0; i < n; ++i) cin >> l[i], l[i] *= 2;
  for (i = 0; i < n; ++i) cin >> t[i];
  for (i = 1; i < n; ++i) pos[i] = pos[i - 1] + l[i - 1];
  for (i = 0; i < n; ++i) {
    if (l[i] > 2 * t[i]) {
      cout << -1 << endl;
      return;
    }
  }
  pos[n] = pos[i - 1] + l[n - 1];
  long long x = 0, u, T = t[0], ind = 0, L = l[0];
  long long k, Tsum = 0;
  vector<long long> ret;
  long long sz = 0;
  long long temp;
  while (ind < n) {
    if (L <= T) {
      x = pos[ind + 1], ++ind;
      Tsum += L;
      T = t[ind], L = l[ind];
      continue;
    } else {
      u = 2 * T - L;
      assert(u >= 0);
      Tsum += u;
      x += u;
      L -= u;
      k = (L - 1) / (r * 2) + 1;
      x += k * 2 * r;
      temp = Tsum + r * k;
      sz += k;
      for (i = 0; i < k && ret.size() <= (int)1e5; ++i) {
        ret.push_back(Tsum);
        Tsum += r;
      }
      Tsum = temp;
      while (ind <= n) {
        if (pos[ind] <= x)
          ++ind;
        else
          break;
      }
      if (ind == n + 1) break;
      --ind;
      L = x - pos[ind];
      T = t[ind] - L / 2;
      L = l[ind] - L;
    }
  }
  cout << sz << endl;
  if (sz <= 1e5) {
    for (i = 0; i < ret.size(); ++i) cout << ret[i] << " ";
    cout << endl;
  }
}
int main() { solve(); }
