#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N >> S; if(N==1){ cout << 1 << endl; cout << 1 << endl; return 0; } vector

v(N); REP(i,N){ cin >> v[i].first; v[i].second=i+1; } sort(v.begin(),v.end()); vector a; REP(i,N){ if(i==0){ if(v[1].first-v[0].first>S) a.push_back(v[0].second); } else if(i==N-1){ if(v[N-1].first-v[N-2].first>S) a.push_back(v[N-1].second); } else{ if(v[i].first-v[i-1].first>S && v[i+1].first-v[i].first>S) a.push_back(v[i].second); } } int m=a.size(); cout << m << endl; sort(a.begin(),a.end()); REP(i,m) cout << a[i] << ' '; cout << endl; return 0; }