#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200500;
long long n, r;
long long l[MAXN];
long long t[MAXN];
vector<long long> res;
long long ans;
int main() {
  cin >> n >> r;
  for (int i = 0; i < (int)(n); ++i) cin >> l[i];
  for (int i = 0; i < (int)(n); ++i) cin >> t[i];
  for (int i = 0; i < (int)(n); ++i) {
    if (t[i] < l[i]) {
      cout << -1;
      return 0;
    }
  }
  long long timer = 0;
  long long cur_run = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (cur_run >= l[i]) {
      cur_run -= l[i];
      timer += l[i];
    } else {
      timer += cur_run;
      l[i] -= cur_run;
      t[i] -= cur_run;
      if (2ll * l[i] > t[i]) {
        long long x = t[i] - l[i];
        l[i] -= x;
        t[i] -= 2ll * x;
        timer += 2ll * x;
        long long cnt = (l[i] + r - 1) / r;
        ans += cnt;
        cur_run = r * cnt - l[i];
        if (ans <= (long long)1e5) {
          while (cnt) {
            res.push_back(timer);
            timer += r;
            cnt--;
          }
        }
        timer -= cur_run;
      } else {
        cur_run = 0;
        timer += l[i] * 2ll;
      }
    }
  }
  cout << ans << '\n';
  if (ans <= (long long)1e5)
    for (int i = 0; i < (int)((int)res.size()); ++i) cout << res[i] << ' ';
  return 0;
}
