#include <bits/stdc++.h>
using namespace std;
void fast_io() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}
const long long SIZE = (long long)2e5;
long long l[SIZE + 10];
long long t[SIZE + 10];
int main() {
  long long n, r;
  scanf("%lld", &n);
  scanf("%lld", &r);
  for (long long i = 0; i <= n - 1; i++) scanf("%lld", &l[i]);
  for (long long i = 0; i <= n - 1; i++) scanf("%lld", &t[i]);
  long long left = 0;
  vector<long long> v;
  long long tm = 0;
  long long cnt = 0;
  for (long long i = 0; i <= n - 1; i++) {
    long long dist = l[i];
    long long time = t[i];
    if (dist > time) {
      printf("-1");
      return 0;
    }
    long long use = min(dist, left);
    dist = dist - use;
    time = time - use;
    left -= use;
    tm += use;
    if (2 * dist > time) {
      long long lo = 0;
      long long hi = dist;
      long long ans = 0;
      while (lo <= hi) {
        long long mid = (lo + hi) / 2;
        long long dist_left = dist - mid;
        long long time_left = time - 2 * mid;
        if (dist_left > time_left) {
          hi = mid - 1;
        } else {
          ans = mid;
          lo = mid + 1;
        }
      }
      long long dist_left = dist - ans;
      long long num_bottles = (dist_left / r);
      if (dist_left % r != 0) {
        ++num_bottles;
        left += r - dist_left % r;
      }
      cnt += num_bottles;
      tm += 2 * ans;
      if (cnt <= (long long)1e5) {
        for (int i = 0; i < num_bottles; ++i) {
          v.push_back(tm);
          long long use = min(dist_left, r);
          dist_left -= use;
          tm += use;
        }
      }
    } else {
      tm += dist * 2;
    }
  }
  if (cnt <= (long long)1e5) {
    printf("%lld\n", cnt);
    for (int i = 0; i < v.size(); ++i) printf("%lld ", v[i]);
  } else
    printf("%lld", cnt);
  return 0;
}
