#include <bits/stdc++.h>
using namespace std;
long long n, r, l[210000], t[210000], ans, a[110000], b, x, y, c;
int main() {
  scanf("%I64d%I64d", &n, &r);
  for (int i = 1; i <= n; i++) scanf("%I64d", &l[i]);
  for (int i = 1; i <= n; i++) scanf("%I64d", &t[i]);
  for (int i = 1; i <= n; i++)
    if (t[i] < l[i]) {
      printf("-1\n");
      return 0;
    }
  b = 0;
  c = 0;
  for (int i = 1; i <= n; i++) {
    if (l[i] <= b) {
      b -= l[i];
      c += l[i];
    } else {
      l[i] -= b;
      t[i] -= b;
      c += b;
      b = 0;
      x = 2 * l[i] - t[i];
      if (x > 0) {
        y = (x - 1) / r + 1;
        if (ans + y <= 100000) {
          for (int j = 1; j <= y; j++) a[++ans] = c + t[i] - x + r * (j - 1);
        } else
          ans += y;
        b = (r - x % r) % r;
        c += t[i];
      } else
        c += 2 * l[i];
    }
  }
  printf("%I64d\n", ans);
  if (ans <= 100000) {
    for (int i = 1; i < ans; i++) printf("%I64d ", a[i]);
    if (ans) printf("%I64d", a[ans]);
    printf("\n");
  }
  return 0;
}
