#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const double PI = acos(-1.);
const double eps = 1e-10;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const int MAXN = 1e6 + 5;
int l[MAXN], t[MAXN];
int main() {
  int n;
  long long r;
  scanf("%d %lld", &n, &r);
  for (int i = 1; i <= n; i++) scanf("%d", &l[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &t[i]);
  long long ans = 0;
  long long left = 0;
  vector<long long> path;
  long long time = 0;
  int ok = 1;
  for (int i = 1; i <= n; i++) {
    if (t[i] < l[i]) ok = 0;
    long long past = 0;
    long long tt = left;
    left = max(0LL, left - l[i]);
    l[i] -= tt - left;
    t[i] -= tt - left;
    past += tt - left;
    long long t2 = max(0, 2 * l[i] - t[i]);
    long long num = (t2 + r - 1) / r;
    past += t2;
    past += (l[i] - t2) * 2;
    ans += num;
    if (ans <= 100000) {
      long long pre = past + time - t2;
      for (int j = 1; j <= num; j++) path.push_back(pre), pre += r;
    }
    time += past;
    left += num * r - t2;
  }
  if (!ok)
    puts("-1");
  else {
    printf("%lld\n", ans);
    if (ans <= 100000) {
      assert(path.size() == ans);
      for (long long i : path) printf("%lld ", i), assert(i >= 0);
    }
    puts("");
  }
  return 0;
}
