#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5;
long long L[maxn], T[maxn];
int M = 2e5;
int main() {
  long long r;
  int n;
  while (~scanf("%d%I64d", &n, &r)) {
    for (int i = 0; i < n; i++) scanf("%I64d", &L[i]), L[i] *= 2;
    for (int i = 0; i < n; i++) scanf("%I64d", &T[i]);
    long long cnt = 0, t0 = 0, curt = 0;
    vector<long long> p;
    for (int i = 0; i < n; i++) {
      long long Li = L[i], Ti = T[i];
      if (Ti * 2 < Li) {
        cnt = -1;
        break;
      }
      if (2 * t0 >= Li) {
        t0 -= Li / 2;
        curt += Li / 2;
      } else {
        Li -= t0 * 2;
        Ti -= t0;
        curt += t0;
        t0 = 0;
        if (Li > Ti) {
          long long k = (Li - Ti) / r;
          long long t = (Li - Ti) % r;
          if (t == 0) t = r, k--;
          t0 = r - t;
          cnt += k + 1;
          curt += Ti;
          for (long long i = 0; i <= k && p.size() <= M; i++)
            p.push_back(curt - t - i * r);
        } else
          curt += Li;
      }
    }
    printf("%I64d\n", cnt);
    if (cnt >= 1 && cnt <= 1e5) {
      sort(p.begin(), p.end());
      for (int i = 0; i < p.size(); i++)
        printf("%I64d%c", p[i], i == p.size() - 1 ? '\n' : ' ');
    }
  }
  return 0;
}
