#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5 * 1e5 + 5;
const int CONSTLIMIT = 1e5;
int n;
long long r;
long long t[MAXN], l[MAXN];
vector<long long> ans2;
long long getTheAnswers() {
  for (int i = 1; i <= n; i++)
    if (l[i] > t[i]) return -1;
  long long pos = 0, fromBef = 0, ans = 0;
  for (int i = 1; i <= n; i++) {
    if (fromBef >= l[i]) {
      fromBef -= l[i];
      pos += l[i];
      continue;
    }
    l[i] -= fromBef, t[i] -= fromBef, pos += fromBef;
    fromBef = 0;
    if (t[i] >= 2 * l[i]) {
      pos += 2 * l[i];
      continue;
    }
    long long x = t[i] - l[i];
    pos += 2 * x;
    l[i] -= x;
    t[i] -= 2 * x;
    long long howMany = l[i] / r;
    if (l[i] % r) howMany++;
    ans += howMany;
    long long tmp = pos;
    while (ans2.size() < CONSTLIMIT + 5 && tmp < pos + t[i]) {
      ans2.push_back(tmp);
      tmp += r;
    }
    pos += l[i];
    fromBef = 0;
    if (l[i] % r) fromBef = r - l[i] % r;
  }
  return ans;
}
int main() {
  cin >> n >> r;
  for (int i = 1; i <= n; i++) cin >> l[i];
  for (int i = 1; i <= n; i++) cin >> t[i];
  long long ans = getTheAnswers();
  if (ans == -1)
    cout << -1 << endl;
  else {
    cout << ans << endl;
    sort(ans2.begin(), ans2.end());
    if (ans <= CONSTLIMIT) {
      for (int j = 0; j < (int)ans2.size(); j++)
        if (j == (int)ans2.size() - 1)
          cout << ans2[j] << endl;
        else
          cout << ans2[j] << " ";
    }
  }
}
