#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n, s; cin >> n >> s; vector> p(n); rep(i, n) cin >> p[i].first, p[i].second = i; sort(p.begin(), p.end()); vector ans(0); rep(i, n) { bool isIsolated = true; if (i > 0) { if (p[i].first - p[i - 1].first <= s) isIsolated = false; } if (i + 1 < n) { if (p[i + 1].first - p[i].first <= s) isIsolated = false; } if (isIsolated) ans.push_back(p[i].second); } sort(ans.begin(), ans.end()); cout << ans.size() << endl; for (auto a : ans) cout << a + 1 << " "; cout << endl; return 0; }