#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  long long n, r;
  scanf("%lld%lld", &n, &r);
  vector<long long> length(n), time(n), output;
  for (int i = 0; i < n; i++) scanf("%lld", &length[i]);
  for (int i = 0; i < n; i++) scanf("%lld", &time[i]);
  for (int i = 0; i < n; i++) {
    if (length[i] > time[i]) {
      printf("-1\n");
      return 0;
    }
  }
  long long timer = 0, rem = 0;
  long long ansCount = 0;
  for (int i = 0; i < n; i++) {
    if (rem > 0) {
      long long fast = min(rem, length[i]);
      rem -= fast;
      length[i] -= fast;
      time[i] -= fast;
      timer += fast;
    }
    if (length[i] == 0) continue;
    if (2 * length[i] <= time[i]) {
      timer += 2 * length[i];
      continue;
    }
    long long m = 2 * length[i] - time[i];
    long long count = m / r + (m % r > 0);
    ansCount += count;
    rem = count * r - m;
    long long cur = timer + 2 * (length[i] - m);
    for (int j = 0; j < count && output.size() < 100000; j++) {
      output.push_back(cur);
      cur += r;
    }
    timer += time[i];
  }
  cout << ansCount << "\n";
  if (ansCount > 100000) return 0;
  for (int i = 0; i < output.size(); i++) {
    cout << output[i] << "\n "[i < output.size() - 1];
  }
  return 0;
}
