#include using namespace std; int main(){ int n,s; cin >> n >> s; vector p(n); for(int i = 0;i < n;i++) cin >> p[i]; auto t = p; sort(t.begin(),t.end()); map m; for(int i = 0;i < n;i++) m[p[i]]++; vector count; for(int i = 0;i < n;i++){ if(m[p[i]] > 1) continue; int k = lower_bound(t.begin(),t.end(),p[i]) - t.begin(); bool b = false; if(!(k + 1 == n)){ if(s >= abs(t[k] - t[k + 1])){ b = true; } } if(!(k - 1 == -1)){ if(s >= abs(t[k] - t[k - 1])){ b = true; } } if(!b) count.emplace_back(i); } cout << count.size() << endl; for(auto to : count) cout << to + 1 << ' '; cout << endl; }