import java.io.*; import java.util.*; import java.util.function.*; import java.util.stream.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int n = sc.nextInt(); int s = sc.nextInt(); TreeSet stars = new TreeSet<>(); for (int i = 1; i <= n; i++) { stars.add(new Star(i, sc.nextInt())); } stars.add(new Star(0, Integer.MIN_VALUE / 2)); stars.add(new Star(0, Integer.MAX_VALUE)); List ans = stars.stream() .filter(x -> x.idx != 0 && x.value - stars.lower(x).value > s && stars.higher(x).value - x.value > s) .sorted((a, b) -> a.idx - b.idx) .toList(); System.out.println(ans.size()); System.out.println(ans.stream().map(x -> x.toString()).collect(Collectors.joining(" "))); } static class Star implements Comparable { int idx; int value; public Star(int idx, int value) { this.idx = idx; this.value = value; } public int hashCode() { return idx; } public boolean equals(Object o) { Star s = (Star)o; return idx == s.idx && value == s.value; } public int compareTo(Star another) { return value == another.value ? idx - another.idx : value - another.value; } public String toString() { return String.valueOf(idx); } } } class Scanner { BufferedReader br; StringTokenizer st = new StringTokenizer(""); StringBuilder sb = new StringBuilder(); public Scanner() { try { br = new BufferedReader(new InputStreamReader(System.in)); } catch (Exception e) { } } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String next() { try { while (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } } catch (Exception e) { e.printStackTrace(); } finally { return st.nextToken(); } } }