#include <bits/stdc++.h>
using namespace std;
int N;
long long R, L[200020], T[200020];
vector<long long> V;
int main() {
  scanf("%d%lld", &N, &R);
  for (int i = 1; i <= N; i++) scanf("%lld", L + i);
  for (int i = 1; i <= N; i++) scanf("%lld", T + i);
  for (int i = 1; i <= N; i++)
    if (L[i] > T[i]) {
      puts("-1");
      return 0;
    }
  long long ans = 0;
  long long p = 0, tm = 0;
  for (int i = 1; i <= N; i++) {
    if (p >= L[i]) {
      p -= L[i];
      tm += L[i];
      continue;
    }
    long long min_b = 2 * L[i] - T[i];
    if (p >= min_b) {
      tm += L[i] + (L[i] - p);
      p = 0;
      continue;
    }
    long long t = (min_b - p + R - 1) / R;
    long long stm = tm + 2 * (L[i] - min_b) + p;
    for (int k = 0; k < t; k++) {
      if ((int)V.size() == 100000) break;
      V.push_back(stm + k * R);
    }
    ans += t;
    p = t * R - (min_b - p);
    tm += T[i];
  }
  printf("%lld\n", ans);
  if (ans <= 100000) {
    for (long long e : V) printf("%lld ", e);
    puts("");
  }
  return 0;
}
