#include <bits/stdc++.h>
using namespace std;
int n;
long long t[200200];
long long l[200200];
long long r;
long long sool[200200];
int cc = 0;
void make(long long st_ti, long long num) {
  for (int i = 0; i < num; i++) {
    sool[cc++] = st_ti;
    st_ti += r;
    if (cc > 100000) break;
  }
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> r;
  for (int i = 0; i < n; i++) {
    cin >> l[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  for (int i = 0; i < n; i++) {
    if (t[i] < l[i]) {
      cout << -1 << endl;
      return 0;
    }
  }
  long long sp = 0;
  long long sol = 0;
  long long global_time = 0;
  for (int i = 0; i < n; i++) {
    long long ti = t[i];
    long long dist = l[i];
    long long go_sp = min(sp, dist);
    ti -= go_sp;
    dist -= go_sp;
    sp -= go_sp;
    global_time += go_sp;
    if (dist == 0) continue;
    long long go_normal = min(dist, ti - dist);
    ti -= 2 * go_normal;
    dist -= go_normal;
    global_time += 2 * go_normal;
    if (ti != dist && dist != 0) {
      cout << "ERR";
      while (1)
        ;
    }
    if (dist == 0) continue;
    long long use = (dist + r - 1) / r;
    sol += use;
    sp = use * r - ti;
    make(global_time, use);
    global_time += dist;
  }
  cout << sol << endl;
  if (cc <= 100000) {
    for (int i = 0; i < cc; i++) {
      cout << sool[i] << " ";
    }
  }
}
