procedure swap(var a,b:integer);
var c:integer;
  begin
    c:=a;
    a:=b;
    b:=c;
  end;
var
  n,k,br,x,i,j:integer;
  a:array[1..10000] of integer;
  b:array[1..10000] of integer;
begin
  readln(n,k);
  for i:=1 to n do
  readln(a[i]);
  for i:=1 to (n-1) do
  for j:=(i+1) to n do
  if a[j]<a[i] then swap(a[i],a[j]);
  br:=0;
  for i:=1 to n do
  begin
  while a[i]=a[i+1] do
  br:=br+1;
  if br>=k then x:=x+1;
  if br>=k then b[i]:=i;
  br:=0;
  end;
  writeln(x);
  for i:=1 to x do
  writeln(b[i]);
end.