#include <bits/stdc++.h>
long long a[100005], r;
int l[200005], n;
int main() {
  scanf("%d%I64d\n", &n, &r);
  for (int i = 1; i <= n; i++) scanf("%d", &l[i]);
  long long cur = 0, ans = 0, s = 0;
  for (int i = 1; i <= n; i++) {
    int t;
    scanf("%d", &t);
    if (t < l[i]) {
      printf("-1\n");
      return 0;
    }
    if (s >= l[i])
      s -= l[i], cur += l[i];
    else {
      l[i] -= s;
      t -= s;
      cur += s;
      s = 0;
      if (l[i] * 2 <= t)
        cur += l[i] * 2;
      else {
        cur += (t - l[i]) * 2;
        l[i] -= t - l[i];
        for (; l[i] >= r && ans < 100000; l[i] -= r, cur += r) a[++ans] = cur;
        if (l[i]) {
          if (ans < 100000)
            a[++ans] = cur;
          else
            ans += (l[i] - 1) / r + 1;
          s = r - l[i] % r;
          if (s == r) s = 0;
          cur += l[i];
        }
      }
    }
  }
  printf("%I64d\n", ans);
  if (ans <= 100000)
    for (int i = 1; i <= ans; i++) printf("%I64d ", a[i]);
}
