#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = (int)2e5 + 10;
const int M = (int)2e6 + 100;
const int inf = (int)1e9 + 100;
long long l[N];
long long t[N];
int main() {
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  srand(time(0));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, r, i;
  cin >> n >> r;
  long long last = 0;
  long long ans = 0;
  for ((i) = 0; (i) < (n); (i)++) {
    cin >> l[i];
  }
  for ((i) = 0; (i) < (n); (i)++) {
    cin >> t[i];
    if (l[i] > t[i]) {
      cout << -1;
      return 0;
    }
  }
  vector<long long> v;
  long long time = 0;
  for ((i) = 0; (i) < (n); (i)++) {
    if (l[i] <= last) {
      last -= l[i];
      continue;
    }
    t[i] -= last;
    l[i] -= last;
    last = 0;
    if (2 * l[i] <= t[i]) {
      time += 2 * l[i];
      continue;
    }
    long long c = 2 * l[i] - t[i];
    time += 2 * (l[i] - c);
    ans += (c + r - 1) / r;
    last = (r - c % r) % r;
    long long k = (c + r - 1) / r;
    while (k && v.size() <= 100000) {
      v.push_back(time);
      time += r;
      k--;
    }
  }
  cout << ans << '\n';
  if (v.size() <= 100000) {
    for (auto j : v) {
      cout << j << ' ';
    }
  }
}
