#include <bits/stdc++.h>
using namespace std;
const int M = 2107;
char A[M], B[M];
int la, lb, ca[M][M], cb[M][M], cnt;
struct node {
  int l, r;
} ans[M];
int main() {
  scanf("%s %s", A + 1, B + 1);
  la = strlen(A + 1);
  lb = strlen(B + 1);
  for (int i = lb; i >= 1; i--) {
    for (int j = la; j >= 1; j--)
      if (B[i] == A[j]) ca[i][j] = ca[i + 1][j + 1] + 1;
    for (int j = la; j >= 1; j--)
      if (B[i] == A[la - j + 1]) cb[i][j] = cb[i + 1][j + 1] + 1;
  }
  int now = 1, f = 1;
  while (now <= lb) {
    int x, mx = 0;
    for (int i = 1; i <= la; i++)
      if (ca[now][i] > mx) {
        mx = ca[now][i];
        x = i;
      }
    int y, my = 0;
    for (int i = 1; i <= la; i++)
      if (cb[now][i] > my) {
        my = cb[now][i];
        y = i;
      }
    int len = max(mx, my);
    if (!len) {
      f = 0;
      break;
    }
    cnt++;
    if (mx >= my) {
      ans[cnt].l = x;
      ans[cnt].r = x + len - 1;
    } else {
      ans[cnt].l = la - y + 1;
      ans[cnt].r = la - (y + len - 1) + 1;
    }
    now += len;
  }
  if (!f)
    puts("-1");
  else {
    printf("%d\n", cnt);
    for (int i = 1; i <= cnt; i++) printf("%d %d\n", ans[i].l, ans[i].r);
  }
  return 0;
}
