var
s:array[1..2000] of char;
c:char;
i,j,m,k,qi,n:longint;
function qu(ch:char):boolean;
begin
qu:=false;
if (ch in ['a'..'z']) or (ch in ['A'..'Z']) then exit(true);
end;
function ou(c:integer):longint;
var
l,r,p:integer;
begin
p:=0;
l:=c-1; r:=c;
repeat
while (not qu(s[l])) and (l>0) do dec(l);
while (not qu(s[r])) and (r<m) do inc(r);
if (s[l]=s[r]) or (ord(s[l])-32=ord(s[r])) or (ord(s[l])+32=ord(s[r])) then begin
p:=p+2; inc(r); dec(l); end
else exit(p);
until (l<1) or (r>m);
ou:=p;
end;
function ji(c:integer):longint;
var
l,r,q:integer;
begin
q:=1;
l:=c-1;r:=c+1;
repeat
while (l>0) and (not qu(s[l])) do dec(l);
while (not qu(s[r])) and (r<m) do inc(r);
if (s[l]=s[r]) or (ord(s[l])-32=ord(s[r])) or (ord(s[l])+32=ord(s[r])) then begin
q:=q+2; inc(r); dec(l); end
else exit(q);
until (l<1) or (r>m);
ji:=q;
end;
begin
m:=1;
while not eoln do begin read(c); s[m]:=c; inc(m); end; m:=m-1;
for i:=2 to m do begin
if qu(s[i]) then begin j:=ou(i);
if j>k then begin k:=j; qi:=i; end;
j:=ji(i);
if j>k then begin k:=j; qi:=i; end;
end;
end;
writeln(k,qi);
end.
s:array[1..2000] of char;
c:char;
i,j,m,k,qi,n:longint;
function qu(ch:char):boolean;
begin
qu:=false;
if (ch in ['a'..'z']) or (ch in ['A'..'Z']) then exit(true);
end;
function ou(c:integer):longint;
var
l,r,p:integer;
begin
p:=0;
l:=c-1; r:=c;
repeat
while (not qu(s[l])) and (l>0) do dec(l);
while (not qu(s[r])) and (r<m) do inc(r);
if (s[l]=s[r]) or (ord(s[l])-32=ord(s[r])) or (ord(s[l])+32=ord(s[r])) then begin
p:=p+2; inc(r); dec(l); end
else exit(p);
until (l<1) or (r>m);
ou:=p;
end;
function ji(c:integer):longint;
var
l,r,q:integer;
begin
q:=1;
l:=c-1;r:=c+1;
repeat
while (l>0) and (not qu(s[l])) do dec(l);
while (not qu(s[r])) and (r<m) do inc(r);
if (s[l]=s[r]) or (ord(s[l])-32=ord(s[r])) or (ord(s[l])+32=ord(s[r])) then begin
q:=q+2; inc(r); dec(l); end
else exit(q);
until (l<1) or (r>m);
ji:=q;
end;
begin
m:=1;
while not eoln do begin read(c); s[m]:=c; inc(m); end; m:=m-1;
for i:=2 to m do begin
if qu(s[i]) then begin j:=ou(i);
if j>k then begin k:=j; qi:=i; end;
j:=ji(i);
if j>k then begin k:=j; qi:=i; end;
end;
end;
writeln(k,qi);
end.