program ap;
var
ch:array[1..2000] of boolean;
pic:array[1..1000000] of integer;
n,m,a,b,min,mina,minb,i,j:longint;
f:text;
yon:boolean;
procedure check(a,b:longint);
var i,j:longint;
begin
for i:=1 to m do
ch[i]:=false;
for i:=a to b do
ch[pic[i]]:=true;
yon:=false;
for i:=1 to m do
if ch[i]=false then begin yon:=true;exit; end;
end;
begin
assign(f,'exhibit.in');
reset(f);
readln(f,n,m);
for i:=1 to n do begin
read(f,j); pic[i]:=j;
end;
close(f);
min:=n; mina:=1;
for i:=1 to n-m+1 do begin
a:=i; b:=i+m-2; yon:=true;
while (b<=n) and yon do begin
check(a,b);
if yon=false then
if b+1-a<min then begin min:=b+1-a; mina:=a; minb:=b; end else
if (b+1-a=min) and (mina>a) then begin mina:=a; minb:=b; end;
inc(b);
end;
end;
assign(f,'exhibit.out');
rewrite(f);
writeln(f,mina,' ',minb);
close(f);
end.