#include<iostream>
#include<string>
#include<cmath>
#include<iomanip>
using namespace std;
int lg(int l,string m,string n) {
int p=1;
for (int i = 0; i < n.length(); i++)
{
if (m[l + i] != n[i]) p = 0;
}
return p;
}
int main()
{
string n, ngx;
int n1,ngx1,sum=0,shouci=0;
getline (cin,n);
getline(cin, ngx);
ngx1 = ngx.length();
n1 = n.length();
for (int i = 0; i <n1; ++i) {
n[i] = tolower(n[i]);
}
for (int i = 0; i <ngx1; ++i) {
ngx[i] = tolower(ngx[i]);
}
n = " " + n + " "; ngx = " " + ngx + " ";
n1 = n1 + 2; ngx1 = ngx1 + 2;
for (int i = 0; i <n1; i++)
{
if (lg(i, n, ngx))
{
sum++;
if (sum == 1) shouci = i;
}
}
if (sum == 0) cout << "-1";
else cout << sum << " " << shouci;
return 0;
}