#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  char a[2102], b[2102];
  int ans1[2102], ans2[2102], cnt, s, e, flag = 0;
  scanf("%s%s", a, b);
  int len1, len2, i, j, len;
  len1 = strlen(a);
  len2 = strlen(b);
  memset(ans1, 0, sizeof(ans1));
  memset(ans2, 0, sizeof(ans2));
  cnt = 0;
  for (i = 0; i < len2; i++) {
    len = 0;
    flag = 0;
    for (j = 0; j < len1; j++) {
      if (b[i] == a[j]) {
        flag = 1;
        s = j;
        e = j;
        for (int k = 1; j + k < len1 && i + k < len2; k++) {
          if (a[j + k] == b[i + k])
            e++;
          else
            break;
        }
        if (e - s + 1 > len) {
          len = e - s + 1;
          ans1[cnt] = s + 1;
          ans2[cnt] = e + 1;
        }
        s = j;
        e = j;
        for (int k = 1; j - k >= 0 && i + k < len2; k++) {
          if (a[j - k] == b[i + k])
            e--;
          else
            break;
        }
        if (s - e + 1 > len) {
          len = s - e + 1;
          ans1[cnt] = s + 1;
          ans2[cnt] = e + 1;
        }
      }
    }
    if (!flag) break;
    cnt++;
    i += len - 1;
  }
  if (!flag)
    printf("-1\n");
  else {
    printf("%d\n", cnt);
    for (int m = 0; m < cnt; m++) printf("%d %d\n", ans1[m], ans2[m]);
  }
  return 0;
}
