#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n;
long long r;
long long l[N], t[N];
vector<long long> vec;
int main() {
  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 now = 0, ans = 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]) {
      now += 2 * l[i];
      continue;
    }
    long long dt = 2 * l[i] - t[i];
    long long cnt = dt / r;
    while (cnt * r < dt) ++cnt;
    ans += cnt;
    if (ans < N) {
      for (int j = 0; j < cnt; ++j) vec.push_back(now + t[i] - dt + j * r);
    }
    now += t[i] - dt + cnt * r;
    l[i + 1] -= (t[i] - dt) / 2 + cnt * r - l[i];
    t[i + 1] -= (t[i] - dt) / 2 + cnt * r - l[i];
  }
  printf("%I64d\n", ans);
  if (ans <= 1e5)
    for (int i = 0; i < ans; ++i) printf("%I64d ", vec[i]);
  return 0;
}
