#include <bits/stdc++.h>
using namespace std;
int n;
long long ans;
long long r, l[200010], t[200010], tt = 0;
long long stk[200010], top = 0;
bool flag = true;
long long max(long long x, long long y) {
  if (x > y)
    return x;
  else
    return y;
}
int main() {
  scanf("%d%I64d", &n, &r);
  for (int i = 0; i < n; i++) scanf("%I64d", &l[i]);
  for (int i = 0; i < n; i++) scanf("%I64d", &t[i]);
  long long re = 0, t1, t2;
  for (int i = 0; i < n; i++) {
    t1 = 2 * t[i] - 2 * l[i];
    t2 = 2 * l[i] - t[i];
    if (t1 < 0) {
      flag = false;
      break;
    }
    if (re > 0 && re >= t2) {
      t1 = 2 * l[i] - 2 * re;
      if (t1 < 0) {
        tt += l[i];
        re -= l[i];
      } else {
        tt += t1 + re;
        re = 0;
      }
      continue;
    }
    if (t2 <= 0) {
      t2 = 0;
      t1 = 2 * l[i];
      tt += t1;
      re = max(0, re - t1);
      continue;
    }
    long long k;
    long long need = max(0, t2 - re);
    k = need / r;
    if (need % r != 0) k++;
    re = max(k * r - need, 0);
    if (ans + k <= 1e5)
      for (int j = 0; j < k; j++) stk[ans++] = (t[i] - need) + tt + j * r;
    else
      ans += k;
    tt += t[i];
  }
  if (flag) {
    printf("%I64d\n", ans);
    if (ans <= 1e5)
      for (int i = 0; i < ans; i++)
        printf("%I64d%c", stk[i], i == ans - 1 ? '\n' : ' ');
  } else
    printf("-1\n");
  return 0;
}
