第5测试点上没有换行?,读入不了第二行数据,求解
var
s,s1,ss:string;
p:boolean;
i,xx,num:longint;
begin
readln(s);
s:=lowercase(s);
readln(s1);
s1:=lowercase(s1);
s1:=s1+' ';
p:=true;
xx:=-1;
for i:=1 to length(s1) do
if s1[i]<>' ' then ss:=ss+s1[i]
else
begin
if ss=s then
begin
inc(num);
if p then
begin
p:=false;
xx:=xx+i-length(s); end;
end;
ss:='';
end;
if num<>0 then writeln(num,' ',xx)
else writeln('-1');
end.