#include using namespace std; int main() { int n, s; cin >> n >> s; vector> p; for (int i = 1; i <= n; i++) { int x; cin >> x; p.emplace_back(x, i); } sort(p.begin(), p.end()); vector ans; for (int i = 0; i < n; i++) { int x = p[i].first; bool ok = false; if (i - 1 >= 0 && x - p[i - 1].first <= s) { ok = true; } if (i + 1 < n && p[i + 1].first - x <= s) { ok = true; } if (!ok) { ans.emplace_back(p[i].second); } } sort(ans.begin(), ans.end()); cout << ans.size() << endl; for (int x : ans) { cout << x << " "; } cout << endl; }