#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:667772160")
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
long long t[200000 + 7], l[200000 + 7];
long long ans[200000 + 7];
int main() {
  long long n, r, all = 0, need = 0, extra = 0, temp, tp, tp2, alz = 0, kp = 0;
  scanf("%lld %lld", &n, &r);
  for (int i = 0; i < n; i++) scanf("%lld", &l[i]);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &t[i]);
    if (t[i] < l[i]) {
      printf("-1\n");
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    if (extra >= l[i]) {
      all += l[i];
      extra -= l[i];
      continue;
    }
    need = l[i] * 2LL;
    all += t[i];
    need -= extra;
    temp = need - t[i];
    if (temp > 0) {
      extra = 0;
      tp = ceil((double)temp / (double)r);
      tp2 = temp % r;
      if (tp2 == 0)
        tp2 = r;
      else
        extra = r - tp2;
      tp2 = all - tp2;
      alz += tp;
      if (alz > 100000) continue;
      for (long long j = tp2; tp > 0; j -= r, tp--) ans[kp++] = j;
    } else {
      all -= t[i];
      all += need;
      extra = 0;
    }
  }
  if (alz > 100000) {
    deb(alz);
    return 0;
  }
  sort(ans, ans + alz);
  printf("%lld\n", alz);
  for (int i = 0; i < alz; i++) {
    if (i > 0) printf(" ");
    printf("%lld", ans[i]);
  }
  printf("\n");
  return 0;
}
