#include <bits/stdc++.h>
const int N = 2e5 + 5;
inline void up(int &x, int y) { x < y ? x = y : 0; }
inline void down(int &x, int y) { x > y ? x = y : 0; }
inline int max(const int x, const int y) { return x > y ? x : y; }
inline int min(const int x, const int y) { return x < y ? x : y; }
int n, l[N], t[N];
long long ans[N], r, min_step, s0;
inline bool impossible() {
  for (int i = 1; i <= n; ++i)
    if (l[i] > t[i]) return true;
  return false;
}
inline void walk() {
  int d, add, lst;
  long long T, pre;
  pre = 0, T = 0;
  for (int i = 1; i <= n; ++i) {
    if (pre >= l[i]) {
      pre = pre - l[i], T += l[i];
      continue;
    }
    l[i] -= pre, T += pre, t[i] -= pre, pre = 0;
    if (l[i] * 2 <= t[i]) {
      T += l[i] * 2;
      continue;
    }
    d = l[i] * 2 - t[i];
    T = T + t[i] - d;
    s0 += d / r;
    if (d % r) ++s0;
    while (min_step <= 100000) {
      ans[++min_step] = T;
      if (d >= r) {
        T += r, d -= r;
        if (d == 0) break;
      } else
        break;
    }
    d %= r, T += d;
    if (d) pre = r - d;
  }
}
int main() {
  std::ios::sync_with_stdio(false), std::cin.tie(0);
  std::cin >> n >> r;
  for (int i = 1; i <= n; ++i) std::cin >> l[i];
  for (int i = 1; i <= n; ++i) std::cin >> t[i];
  if (impossible()) return std::cout << -1 << '\n', 0;
  walk();
  std::cout << s0 << '\n';
  if (s0 > 100000) return 0;
  for (int i = 1; i <= min_step; ++i) std::cout << ans[i] << ' ';
  std::cout << '\n';
  return 0;
}
