#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
long long l[maxn], t[maxn];
vector<long long> res;
int main() {
  int n;
  long long r;
  scanf("%d%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]) {
      puts("-1");
      return 0;
    }
  }
  long long ans = 0, x = 0;
  for (int i = 1; i <= n; i++) {
    if (l[i] <= 0) {
      l[i + 1] += l[i];
      t[i + 1] += l[i];
      continue;
    }
    if (t[i] >= 2 * l[i]) {
      x += 2 * l[i];
      continue;
    }
    long long cnt = (2 * l[i] - t[i] + r - 1) / r;
    long long sur = t[i] - l[i] + cnt * r - l[i];
    ans += cnt;
    l[i + 1] -= sur;
    t[i + 1] -= sur;
    x += (t[i] - l[i]) * 2;
    for (int j = 0; j < cnt && res.size() < 100000; j++) {
      res.push_back(x);
      x += r;
    }
  }
  printf("%I64d\n", ans);
  if (ans <= 100000) {
    for (int i = 0; i < res.size(); i++) {
      printf("%I64d%c", res[i], (i == res.size() - 1) ? '\n' : ' ');
    }
  }
  return 0;
}
