#include <bits/stdc++.h>
using namespace std;
int n;
long long ans;
vector<long long> ansS;
long long r, curR;
long long T;
vector<pair<long long, long long> > bridges;
void prAns() {
  cout << ans << endl;
  if (ans >= 0 && ans <= 100000) {
    for (int i = 0; i < ans; i++) {
      if (i) {
        cout << ' ';
      }
      cout << ansS[i];
    }
  }
}
void no() {
  ans = -1;
  prAns();
  exit(0);
}
void pushAns(long long t) {
  ++ans;
  if (ans < 100000) {
    ansS.push_back(t);
  }
}
void pushAns(long long t, long long cnt) {
  ans += cnt;
  for (long long i = 0; i < cnt && (int)ansS.size() < 100000; ++i) {
    ansS.push_back(t + i * r);
  }
}
void read() {
  cin >> n >> r;
  bridges.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> bridges[i].first;
  }
  for (int i = 0; i < n; i++) {
    cin >> bridges[i].second;
  }
}
void solve() {
  for (int i = 0; i < n; i++) {
    long long prR = curR;
    long long curL = bridges[i].first;
    long long curT = bridges[i].second;
    if (curL > curT) {
      no();
    }
    if (curR >= curL) {
      T += curL;
      curR -= curL;
      continue;
    }
    curL -= curR;
    curT -= curR;
    curR = 0;
    if (2 * curL <= curT) {
      T += 2 * curL + prR;
      continue;
    }
    long long tR = 2 * curL - curT;
    long long cntR = (tR + r - 1) / r;
    curR = cntR * r - tR;
    pushAns(T + bridges[i].second - tR, cntR);
    T += bridges[i].second;
  }
  prAns();
}
int main() {
  read();
  solve();
  return 0;
}
