#include <bits/stdc++.h>
using namespace std;
const long long M = 2e4 + 7, P = 129192391239123187, PP = 1291923912391231247;
int read() {
  int ans = 0, f = 1, c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + (c - '0');
    c = getchar();
  }
  return ans * f;
}
char S[M], T[M];
int ls, lt, L, R;
unsigned long long h1[M], h2[M], w[M], hh1[M], hh2[M], ww[M];
bool find(int len, unsigned long long now, unsigned long long nnow) {
  for (int i = 1; i <= ls - len + 1; i++) {
    int l = i, r = i + len - 1;
    if (h1[r] - h1[l - 1] * w[len] == now &&
        hh1[r] - hh1[l - 1] * ww[len] == nnow) {
      L = l;
      R = r;
      return 1;
    }
  }
  for (int i = 1; i <= ls - len + 1; i++) {
    int l = i, r = i + len - 1;
    if (h2[r] - h2[l - 1] * w[len] == now &&
        hh2[r] - hh2[l - 1] * ww[len] == nnow) {
      L = ls - l + 1;
      R = ls - r + 1;
      return 1;
    }
  }
  return 0;
}
int cnt;
struct node {
  int l, r;
} ans[M];
int main() {
  w[0] = 1;
  for (int i = 1; i < M; i++) w[i] = w[i - 1] * P;
  ww[0] = 1;
  for (int i = 1; i < M; i++) ww[i] = ww[i - 1] * PP;
  scanf("%s %s", S + 1, T + 1);
  ls = strlen(S + 1);
  lt = strlen(T + 1);
  for (int i = 1; i <= ls; i++)
    h1[i] = h1[i - 1] * P + S[i], hh1[i] = hh1[i - 1] * PP + S[i];
  int x = 1;
  for (int i = ls; i >= 1; i--)
    h2[x] = h2[x - 1] * P + S[i], hh2[x] = hh2[x - 1] * PP + S[i], x++;
  int l = 1, r = 1, f;
  while (l <= lt) {
    unsigned long long now = T[l], nnow = T[l];
    f = 0;
    while (r <= lt && find(r - l + 1, now, nnow))
      f = 1, r++, now = now * P + T[r], nnow = nnow * PP + T[r];
    if (!f) break;
    cnt++;
    ans[cnt].l = L;
    ans[cnt].r = R;
    l = r;
  }
  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;
}
