#include <bits/stdc++.h>
using namespace std;
struct bridge_t {
  bool boosted = false;
  long long length, time;
};
int main() {
  long long n, r;
  cin >> n >> r;
  deque<bridge_t> bridges(n);
  for (long long i = 0; i < n; i++) {
    cin >> bridges[i].length;
  }
  for (long long i = 0; i < n; i++) {
    cin >> bridges[i].time;
  }
  long long time = 0;
  vector<long long> ans;
  long long ans_size = 0;
  while (!bridges.empty()) {
    if (bridges.front().boosted) {
      if (ans_size <= 1e5) {
        ans_size++;
        ans.push_back(time);
        time += r;
        bridges.front().length -= r;
      } else {
        long long i = ceil(bridges.front().length / double(r));
        ans_size += i;
        time += r * i;
        bridges.front().length -= r * i;
      }
    } else if (2 * bridges.front().length <= bridges.front().time) {
      time += max(0LL, 2 * bridges.front().length);
      bridges.front().length = min(0LL, bridges.front().length);
    } else if (bridges.front().length <= bridges.front().time) {
      long long delta = bridges.front().time - bridges.front().length;
      time += 2 * delta;
      bridges.front().boosted = true;
      bridges.front().length -= delta;
      bridges.front().time -= 2 * delta;
    } else {
      cout << -1;
      exit(0);
    }
    if (bridges.front().length <= 0) {
      long long remain = -bridges.front().length;
      if (bridges.size() > 1) {
        bridges[1].length -= remain;
        bridges[1].time -= remain;
      }
      bridges.pop_front();
    }
  }
  cout << ans_size << endl;
  if (ans_size <= 1e5) {
    for (long long t : ans) {
      cout << t << " ";
    }
  }
}
