#include <bits/stdc++.h>
using namespace std;
long long l[200005], t[200005];
int main() {
  int n;
  long long r;
  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]);
    if (l[i] > t[i]) {
      printf("-1");
      return 0;
    }
  }
  vector<long long> ans;
  long long timeLeft = 0;
  long long ret = 0;
  long long currentTime = 0;
  for (int i = 0; i < n; ++i) {
    long long fastmove = min(timeLeft, l[i]);
    timeLeft -= fastmove;
    l[i] -= fastmove;
    long long timeLeftForThis = t[i] - fastmove;
    if (l[i] == 0) {
      continue;
    }
    assert(timeLeft == 0);
    if (l[i] * 2 <= timeLeftForThis) {
      currentTime += l[i] * 2;
      continue;
    } else {
      assert(l[i] <= timeLeftForThis);
      long long low = 0;
      long long high = l[i];
      long long poss = -1;
      while (high >= low) {
        long long mid = (high + low) / 2;
        long long timeUsed = mid * 2;
        if (l[i] - mid <= timeLeftForThis - timeUsed) {
          poss = mid;
          low = mid + 1;
        } else {
          high = mid - 1;
        }
      }
      assert(poss != -1);
      l[i] -= poss;
      currentTime += poss * 2;
      long long pots = (l[i] + r - 1) / r;
      ret += pots;
      timeLeft = pots * r - l[i];
      while (ans.size() <= 100000 and pots--) {
        ans.push_back(currentTime);
        currentTime += r;
      }
    }
  }
  printf("%lld\n", ret);
  if (ans.size() <= 100000) {
    for (auto x : ans) {
      printf("%lld ", x);
    }
  }
}
