#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long l[N], t[N];
vector<long long> kq;
int main() {
  int n;
  long long r;
  scanf("%d%lld", &n, &r);
  for (int i = 0; i < n; i++) {
    scanf("%lld", l + i);
  }
  for (int i = 0; i < n; i++) {
    scanf("%lld", t + i);
  }
  long long now = 0;
  long long ans = 0;
  long long thoigian = 0;
  for (int i = 0; i < n; i++) {
    if (now > l[i]) {
      now -= l[i];
      t[i] -= l[i];
      thoigian += l[i];
      l[i] = 0;
    } else {
      l[i] -= now;
      t[i] -= now;
      thoigian += now;
      now = 0;
    }
    if (l[i] * 2 > t[i]) {
      if (l[i] > t[i]) {
        printf("-1");
        return 0;
      }
      long long tmp = t[i] - l[i];
      l[i] -= tmp;
      thoigian += tmp * 2;
      t[i] -= tmp * 2;
      long long sl = (l[i] + r - 1) / r;
      if (sl * r >= l[i]) {
        now = sl * r - l[i];
      } else
        now = 0;
      for (int j = 0; j < sl; j++) {
        if (kq.size() >= 100000) break;
        kq.push_back(thoigian + j * r);
      }
      ans += sl;
      thoigian += l[i];
    } else
      thoigian += l[i] * 2;
  }
  printf("%lld\n", ans);
  if (ans <= 100000)
    for (auto &v : kq) printf("%lld ", v);
  return 0;
}
