#include <bits/stdc++.h>
using namespace std;
const int N = 200500;
const int LIM = 1e5;
int n;
long long r;
long long l[N], t[N];
vector<long long> ans;
void solve() {
  scanf("%d%lld", &n, &r);
  for (int i = 0; i < n; i++) scanf("%lld", &l[i]);
  for (int i = 0; i < n; i++) scanf("%lld", &t[i]);
  for (int i = 0; i < n; i++) {
    if (l[i] > t[i]) {
      printf("-1\n");
      return;
    }
  }
  long long timer = 0, rem = 0;
  long long ansCnt = 0;
  for (int i = 0; i < n; i++) {
    if (rem > 0) {
      long long fast = min(rem, l[i]);
      rem -= fast;
      l[i] -= fast;
      t[i] -= fast;
      timer += fast;
    }
    if (l[i] == 0) continue;
    if (2 * l[i] <= t[i]) {
      timer += 2 * l[i];
      continue;
    }
    long long m = 2 * l[i] - t[i];
    long long cnt = m / r + (m % r > 0);
    ansCnt += cnt;
    rem = cnt * r - m;
    long long cur = timer + 2 * (l[i] - m);
    for (int j = 0; j < cnt && ans.size() < LIM; j++) {
      ans.push_back(cur);
      cur += r;
    }
    timer += t[i];
  }
  printf("%lld\n", ansCnt);
  if (ansCnt > LIM) return;
  for (int i = 0; i < ansCnt; i++) printf("%lld ", ans[i]);
  printf("\n");
}
int main() {
  solve();
  (void)0;
  return 0;
}
