#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int mod = 1e9 + 7;
int n, l[N], t[N];
long long r;
int main() {
  scanf("%d%lld", &n, &r);
  for (int i = 0; i < n; i++) scanf("%d", l + i);
  for (int i = 0; i < n; i++) {
    scanf("%d", t + i);
    if (t[i] < l[i]) return puts("-1");
  }
  vector<long long> out;
  long long cur = 0, time = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    int x = min((long long)l[i], cur);
    cur -= x;
    l[i] -= x;
    t[i] -= x;
    time += x;
    x = l[i] + l[i];
    time += min(x, t[i]);
    int d = x - t[i];
    if (d <= 0) continue;
    int need = (d + r - 1) / r;
    ans += need;
    long long lo = time - d;
    for (int j = 0; j < need; j++) {
      if (out.size() > 100000) break;
      out.push_back(lo);
      lo += r;
    }
    cur = need * r - d;
  }
  printf("%lld\n", ans);
  if (ans <= 100000) {
    for (int i = 0; i < ans; i++) printf("%lld ", out[i]);
  }
}
