#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 20;
long long l[maxn], t[maxn];
int n;
long long r;
vector<long long> vi;
int main() {
  scanf("%d%lld", &n, &r);
  for (int i = 1; i <= n; i++) scanf("%lld", &l[i]);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
    if (t[i] < l[i]) {
      puts("-1");
      return 0;
    }
  }
  long long ans = 0;
  long long rest = 0;
  long long T = 0;
  for (int i = 1; i <= n; i++) {
    if (rest >= l[i]) {
      rest -= l[i];
      T += l[i];
      continue;
    } else {
      l[i] -= rest;
      t[i] -= rest;
      T += rest;
      rest = 0;
    }
    if (t[i] >= l[i] * 2) {
      T += l[i] * 2;
      continue;
    } else {
      long long need = 2 * l[i] - t[i];
      T += (l[i] - need) * 2;
      long long tmpans = need / r;
      if (need % r) tmpans++;
      for (int j = 0; j < tmpans && vi.size() < 100000; j++) {
        vi.push_back(T + j * r);
      }
      T += need;
      ans += tmpans;
      rest = tmpans * r - need;
    }
  }
  printf("%lld\n", ans);
  if (ans <= 100000)
    for (int i = 0; i < ans; i++)
      printf("%lld%c", vi[i], i == ans - 1 ? '\n' : ' ');
  return 0;
}
