#include <bits/stdc++.h>
using namespace std;
int n;
long long l[200050], t[200050];
long long r;
long long ans[200050];
int main() {
  long long num;
  long long last, tmp, time, t1, t2;
  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);
  for (int i = 0; i < n; i++)
    if (t[i] < l[i]) {
      puts("-1");
      return 0;
    }
  num = 0;
  last = 0;
  time = 0;
  for (int i = 0; i < n; i++) {
    tmp = min(last, l[i]);
    l[i] -= tmp;
    last -= tmp;
    t[i] -= tmp;
    time += tmp;
    if (t[i] < l[i] * 2) {
      t1 = (l[i] * 2 - t[i] - 1) / r + 1;
      t2 = t[i] - l[i];
      time += t2 * 2;
      l[i] -= t2;
      for (int j = 0; num + t1 <= 100000 && j < t1; j++) {
        ans[j + num] = time;
        l[i] -= r;
        if (l[i] >= 0)
          time += r;
        else {
          time += r + l[i];
          last = -l[i];
        }
      }
      if (l[i] > 0) {
        time += l[i];
        last = t1 * r - l[i];
      }
      num += t1;
    } else
      time += l[i] * 2;
  }
  printf("%lld\n", num);
  for (int i = 0; num <= 100000 && i < num; i++)
    printf("%lld%c", ans[i], "\n "[i < num - 1]);
}
