#include using namespace std; int main(){ int n, s; cin >> n >> s; assert(1 <= n && n <= 200000); assert(0 <= s && s <= 1000000000); vector p(n); for(int i = 0; i < n; i++){ cin >> p[i]; assert(0 <= p[i] && p[i] <= 1000000000); } vector ind(n); for(int i = 0; i < n; i++) ind[i] = i; sort(ind.begin(), ind.end(), [&](int i, int j){ return p[i] < p[j]; }); vector ans(n, 1); for(int i = 0; i < n; i++){ if(i != 0 && p[ind[i]] - p[ind[i-1]] <= s){ ans[ind[i]] = 0; ans[ind[i-1]] = 0; } } cout << count(ans.begin(), ans.end(), 1) << '\n'; for(int i = 0; i < n; i++){ if(ans[i] == 1){ if(i != n-1){ cout << i+1 << " "; }else{ cout << i+1 << '\n'; } } } }