#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const long long INF = 1e9 + 19;
int n;
long long r;
int l[N];
int t[N];
int need[N];
void read() {
  scanf("%d%I64d", &n, &r);
  for (int i = 0; i < n; i++) scanf("%d", &l[i]);
  for (int i = 0; i < n; i++) scanf("%d", &t[i]);
}
void solve() {
  for (int i = 0; i < n; i++) {
    if (l[i] > t[i]) {
      puts("-1");
      return;
    }
    need[i] = max(0, l[i] * 2 - t[i]);
  }
  long long answer = 0;
  vector<pair<long long, int>> b;
  long long prev = 0;
  long long curT = 0;
  for (int i = 0; i < n; i++) {
    long long sumPower = min(prev, l[i] * 1ll);
    prev -= sumPower;
    if (need[i] > sumPower) {
      long long rem = need[i] - sumPower;
      long long cnt = (rem + r - 1) / r;
      answer += cnt;
      sumPower += rem;
      long long tEnd = curT + sumPower + (l[i] - sumPower) * 2;
      b.push_back(make_pair(tEnd - rem, cnt));
      assert(cnt * r >= rem);
      prev = (cnt * r) - rem;
    }
    curT += sumPower + (l[i] - sumPower) * 2;
  }
  cout << answer << endl;
  if (answer <= 1e5) {
    for (auto x : b) {
      for (int i = 0; i < x.second; i++) printf("%I64d ", x.first + i * r);
    }
    puts("");
  }
}
void stress() {}
int main() {
  if (1) {
    int k = 1;
    for (int tt = 0; tt < k; tt++) {
      read();
      solve();
    }
  } else {
    stress();
  }
  return 0;
}
