5,9 WA
#include <iostream>
#include <cctype>
#include <cstdio>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
string str,text;
cin>>str;
cin.get();
getline(cin,text);
for (int i=0;i<str.size();i++)
{
str[i]=tolower(str[i]);
}
for (int i=0;i<text.size();i++)
{
text[i]=tolower(text[i]);
}
str=" "+str;
str+=" ";
text=" "+text;
text+=" ";
int cnt=0,ans=0;
int x=0;
while (text.find(str,x)!=string::npos)
{
++cnt;
if (cnt==1)
{
ans=text.find(str,x);
}
x=text.find(str,x)+str.size()+1;
if (x>text.size())
{
break;
}
}
if (cnt!=0)
{
cout<<cnt<<' '<<ans<<'\n';
}
else
{
cout<<-1<<'\n';
}
return 0;
}