#include <bits/stdc++.h>
using namespace std;
const int lmt = 2e5 + 10;
long long l[lmt], t[lmt], n, r;
long long sendcnt() {
  long long extra = 0, sum = 0, ans = 0;
  for (int i = 1; i <= n; i++) {
    sum += l[i];
    if (extra >= l[i]) {
      extra -= l[i];
      continue;
    }
    long long T = 2 * l[i] - extra;
    extra = 0;
    if (T <= t[i]) continue;
    long long need = T - t[i];
    long long last = sum - need;
    long long tot = sum - last;
    long long res = tot / r;
    if (tot % r) res++;
    last += (r * res);
    ans += res;
    extra = last - sum;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> r;
  for (int i = 1; i <= n; i++) {
    cin >> l[i];
  }
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
  }
  for (int i = 1; i <= n; i++) {
    if (t[i] < l[i]) {
      cout << -1 << "\n";
      return 0;
    }
  }
  long long res = sendcnt();
  if (res > 1e5) {
    cout << res << "\n";
    return 0;
  }
  long long extra = 0, sum = 0, sumt = 0;
  vector<long long> ans;
  for (int i = 1; i <= n; i++) {
    sum += l[i];
    if (extra >= l[i]) {
      sumt += l[i];
      extra -= l[i];
      continue;
    }
    long long T = 2 * l[i] - extra;
    extra = 0;
    sumt += T;
    if (T <= t[i]) continue;
    long long need = T - t[i];
    sumt -= need;
    long long last = sum - need;
    long long lastt = sumt - need;
    while (last < sum) {
      ans.push_back(lastt);
      last += r;
      lastt += r;
    }
    extra = last - sum;
  }
  cout << ans.size() << "\n";
  for (long long v : ans) cout << v << " ";
  cout << "\n";
}
