#include <bits/stdc++.h>
using namespace std;
const int N = int(3e5), mod = int(1e9) + 7;
int n, l[N], t[N];
long long ans, r, pref[N], cur, T;
int main() {
  scanf("%d", &n);
  scanf("%I64d", &r);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &l[i]);
    pref[i] = pref[i - 1] + l[i];
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t[i]);
    if (t[i] < l[i]) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (cur <= pref[i]) {
      long long c = cur - pref[i - 1];
      long long x = t[i] - l[i];
      x = max(x, 0ll);
      x = min(x, l[i] - c);
      cur += x;
      x = l[i] - x - c;
      if (x > 0) {
        long long d = (x + r - 1) / r;
        ans += d;
        cur += d * r;
      }
    }
  }
  cout << ans << endl;
  if (ans <= int(1e5)) {
    cur = 0;
    T = 0;
    for (int i = 1; i <= n; i++) {
      if (cur <= pref[i]) {
        long long c = cur - pref[i - 1];
        long long x = t[i] - l[i];
        x = max(x, 0ll);
        x = min(x, l[i] - c);
        cur += x;
        T += 2 * x;
        x = l[i] - x - c;
        if (x > 0) {
          long long d = (x + r - 1) / r;
          ans += d;
          cur += d * r;
          long long cx = d;
          while (cx > 0) {
            cout << T << " ";
            T += r;
            cx--;
          }
        }
      }
    }
  }
  return 0;
}
