#include <bits/stdc++.h>
using namespace std;
long long r;
pair<long long, long long> solve(long long left_to_go_fast) {
  if (left_to_go_fast <= 0) return make_pair(0, 0);
  return make_pair((left_to_go_fast + r - 1) / r,
                   (r - left_to_go_fast % r) % r);
};
int main() {
  long long n;
  cin >> n >> r;
  vector<long long> times(n), distances(n);
  for (int i = 0; i < n; i++) {
    cin >> distances[i];
    distances[i] *= 2;
  }
  for (int i = 0; i < n; i++) {
    cin >> times[i];
    if (times[i] * 2 < distances[i]) {
      cout << -1;
      exit(0);
    }
  }
  long long left = 0;
  long long ans = 0;
  long long cur_time = 0;
  vector<long long> ansv;
  for (int i = 0; i < n; i++) {
    pair<long long, long long> res = solve(distances[i] - times[i] - left);
    ans += res.first;
    if (distances[i] <= 2 * left) {
      assert(res.second == 0);
      left -= distances[i] / 2;
      cur_time += distances[i] / 2;
    } else {
      cur_time += distances[i] - (left + res.first * r - res.second);
      left = res.second;
    }
    long long z = res.first;
    for (long long t = cur_time - r + left; z > 0; z--, t -= r) {
      ansv.push_back(t);
      if (ansv.size() > 100000) break;
    }
  }
  cout << ans << endl;
  if (ansv.size() <= 100000) {
    sort(ansv.begin(), ansv.end());
    for (long long i = 0; i < ansv.size(); i++) cout << ansv[i] << " ";
  }
  return 0;
}
