#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll N, S, P; cin >> N >> S; vector v; vector> w(N+2); w[0] = {-1e18, 0}; w[N+1] = {1e18, N+1}; for (int i=1; i<=N; i++){ cin >> P; w[i] = {P, i}; } sort(w.begin(), w.end()); for (int i=1; i<=N; i++){ if (w[i].first-w[i-1].first>S && w[i+1].first-w[i].first>S){ v.push_back(w[i].second); } } sort(v.begin(), v.end()); cout << v.size() << endl; for (auto x : v) cout << x << " "; cout << endl; return 0; }