#include<bits/stdc++.h>
using namespace std;
int main()
{
string f;
string dc;
string jz;
getline(cin,dc);
getline(cin,jz);
dc=" "+dc+" ";
jz=" "+jz+" ";
int lenj=jz.size();
int lend=dc.size();
int cnt=0;
int wz;
for(int i=0;i<=lend-1;i++)
{
if(dc[i]>='A'&&dc[i]<='Z')
{
dc[i]+=32;
}
}
for(int i=0;i<=lend-1;i++)
{
if(jz[i]>='A'&&jz[i]<='Z')
{
jz[i]+=32;
}
}
for(int i=0;i<=lenj-lend;i++)
{
string t="";
for(int j=i;j<=i+lend-1;j++)
{
t+=jz[j];
}
if(t==dc)
{
cnt++;
if(cnt==1) wz=i;
}
}
if(cnt==0) cout<<-1;
else
{
cout<<cnt<<" "<<wz;
}
return 0;
}