#include<stdio.h>
#include<string.h>
char str1[20] = { ' ' };
char str2[1500001] = { ' ' };
int f1()
{
fgets(&str1[1], sizeof(str1), stdin);
fgets(&str2[1], sizeof(str2), stdin);
str1[strlen(str1) - 1] = ' ';
str2[strlen(str2) - 1] = ' ';
for (int f = 0; f < strlen(str1); f++)
{
if ('A' <= str1[f] && str1[f] <= 'Z')
str1[f] += 'a' - 'A';
}
for (int f = 0; f < strlen(str2); f++)
{
if ('A' <= str2[f] && str2[f] <= 'Z')
str2[f] += 'a' - 'A';
}
int first = -1, count = 0;
for (int f = 0; f < strlen(str2); f++)
{
if (str2[f] == str1[0])
{
int similarity = strlen(str1);
for (int r = 0; r < strlen(str1) && str2[f + r] == str1[r]; r++)
{
similarity--;
}
if (similarity == 0)
{
count++;
if (first == -1)
first = f;
}
}
}
if (count == 0)
{
printf("-1");
}
else
{
printf("%d %d", count, first);
}
return 0;
}
int main()
{
f1();
return 0;
}