Hurricane came to Berland and to suburbs Stringsvill. You are going to it to check if it's all right with you favorite string. Hurrinace broke it a bit by reversing some of its non-intersecting substrings. You have a photo of this string before hurricane and you want to restore it to original state using reversing minimum possible number of its substrings and find out which substrings you should reverse.

You are given a string *s* — original state of your string and string *t* — state of the string after hurricane. You should select *k* non-intersecting substrings of *t* in such a way that after reverse of these substrings string will be equal *s* and *k* is minimum possible.
First line of input contains string *s* and second line contains string *t*. Both strings have same length and consist of lowercase English letters. 1 ≤ |*s*| = |*t*| ≤ 5·10<sup class="upper-index">5</sup>
none
def helperf(index):
  max = 0
  res = 0
  delta = .5
  while True:
    loind = int(index-delta)
    hiind = int(index+delta)
    if loind<0 or hiind>=len(str1):break
    if(str1[hiind] != str2[loind]):break
    max += 1
    if(str1[hiind] != str2[hiind]):res = max
    delta += 1
  bounds = (0,0)
  if(res):
    bounds = (int(index-res+.5),int(index+res+.5))
  return (res,max,index,bounds)

def helperi(index):
  max = 0
  res = 0
  if(str1[index] != str2[index]):return (0,0,index,(0,0))
  delta = 1 
  while True:
    if delta>index or delta+index >= len(str1):break
    if(str1[index+delta] != str2[index-delta]):break
    max += 1
    if(str1[index+delta] != str2[index+delta]):res = max
    delta += 1
  return (res,max,index,(index-res,index+res+1))

def helper(index):
  if(index%1==0):
    return helperi(int(index))
  return helperf(index)

def test(res):
  str3 = list(str2)
  for e in res:
    for i in range((e[1]-e[0])//2):
      # if(e[1]-i-1==i or e[1]-i==i):break
      str3[i+e[0]],str3[e[1]-i-1] = str3[e[1]-i-1],str3[i+e[0]]
    # print(''.join(str3))
  str3 = ''.join(str3) 
  return str3==str1

str1 = input()
str2 = input()

res = []

for i in range(0,len(str1)*2-1):
  t = helper(i/2)
  if(t[0]):
    res.append(t[3])

for i in range(len(res)):
  if(res[i]==None):continue
  for j in range(len(res)):
    if(i==j):continue
    if(res[j]==None):continue
    if(res[i][0]<res[j][0] and res[i][1]>res[j][1]):
      res[j] = None

res = [e for e in res if e!=None]

if(not test(res)):
  print(-1)
  exit()

print(len(res))
for e in res:
  print(e[0]+1,e[1])

r"""
cls ; cat .\e_test.txt | python.exe .\e.py
"""

