#include using namespace std; using i64 = long long; using u64 = unsigned long long; using u32 = unsigned; #define int long long using PII = pair; void solve(){ int n,s; cin>>n>>s; vector p(n); for (int i = 0; i < n;i++){ int k; cin >> k; p[i] = {k, i + 1}; } sort(p.begin(), p.end()); vector vis(n + 1); for (int i = 0; i < n - 1;i++){ auto [p1, num1] = p[i]; auto [p2, num2] = p[i + 1]; if(abs(p1-p2)<=s){ vis[num1] = vis[num2] = 1; } } vector ans; for (int i = 1; i <= n;i++){ if(!vis[i]){ ans.push_back(i); } } cout << ans.size() << endl; for(auto i:ans) cout << i << ' '; cout << endl; } signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }