def a_b(a:chr,b:chr):
return abs(ord(a)-ord(b))==0 or abs(ord(a)-ord(b))==32
def wd(a:str,b:str):
na=len(a)
nb=len(b)
count=0
first=-1
for i in range(nb):
if a_b(a[0],b[i]):
j=1
k=i+1
while j<na and k<nb and a_b(a[j],b[k]):
j+=1
k+=1
if j==na and ((k<nb and not('a'<=b[k]<='z' or 'A'<=b[k]<='Z')) or (k==nb)):
count+=1
if count==1:
first=i
if count==0:
print(first)
else:
print(count,first)
aa=input()
bb=input()
wd(aa,bb)