#include <bits/stdc++.h>
using namespace std;
long long n, r;
long long l[200200];
long long t[200200];
long long dp[200200];
long long cdn = 0, dn = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  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 (l[i] > t[i]) {
      cout << "-1\n";
      return 0;
    }
  }
  long long rem_pot = 0;
  long long ctime = 0;
  for (int i = 0; i < n; ++i) {
    if (rem_pot < l[i]) {
      ctime += rem_pot;
      l[i] -= rem_pot;
      t[i] -= rem_pot;
      rem_pot = 0;
      if (l[i] * 2 > t[i]) {
        long long tts = l[i] * 2 - t[i];
        long long pots = (tts + r - 1) / r;
        dn += pots;
        long long fp = (l[i] - tts) * 2;
        for (int i = 0; i < pots && cdn < 100000; ++i) {
          dp[cdn++] = ctime + fp + r * i;
        }
        rem_pot = pots * r - tts;
        ctime += t[i];
      } else {
        ctime += 2 * l[i];
      }
    } else {
      ctime += l[i];
      rem_pot -= l[i];
    }
  }
  cout << dn << "\n";
  if (dn <= 100000) {
    for (int i = 0; i < dn; ++i) {
      if (i) cout << " ";
      cout << dp[i];
    }
  }
  return 0;
}
