#include <bits/stdc++.h>
using namespace std;
long long int L[200005], T[200005];
vector<long long int> v;
int main() {
  long long int i, j, k, l, m, n, r, t, x;
  scanf("%lld %lld", &n, &r);
  for (i = 1; i <= n; i++) scanf("%lld", &L[i]);
  for (i = 1; i <= n; i++) scanf("%lld", &T[i]);
  for (i = 1; i <= n; i++) {
    if (L[i] > T[i]) {
      printf("-1\n");
      return 0;
    }
  }
  long long int Time = 0, rem = 0, ans = 0;
  for (i = 1; i <= n; i++) {
    if (rem >= L[i]) {
      rem -= L[i];
      Time += L[i];
      continue;
    }
    l = L[i] - rem;
    t = T[i] - rem;
    Time += rem;
    rem = 0;
    if (2 * l <= t) {
      Time += 2 * l;
      continue;
    }
    Time += t;
    x = 2 * l - t;
    k = (x % r ? x / r + 1 : x / r);
    ans += k;
    if (ans <= 100000) {
      for (j = 0; j < k; j++) v.push_back(Time - x + j * r);
    }
    rem = k * r - x;
  }
  printf("%lld\n", ans);
  if (ans <= 100000) {
    for (i = 0; i < v.size(); i++) {
      printf("%lld", v[i]);
      if (i < (long long int)v.size())
        printf(" ");
      else
        printf("\n");
    }
  }
  return 0;
}
