#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) void solve() { ll 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; rep(i, n) { bool ok = false; if (i > 0) ok |= p[i].first - p[i - 1].first <= s; if (i < n - 1) ok |= p[i + 1].first - p[i].first <= s; if (!ok) ans.push_back(p[i].second + 1); } sort(ans.begin(), ans.end()); cout << ans.size() << '\n'; rep(i, ans.size()) cout << (i ? " " : "") << ans[i]; cout << '\n'; } int main() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); int T = 1; for (int t = 0; t < T; t++) { solve(); } return 0; }