#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void Read(T &x) {
  int f = 1;
  char t = getchar();
  while (t < '0' || t > '9') {
    if (t == '-') f = -1;
    t = getchar();
  }
  x = 0;
  while (t >= '0' && t <= '9') {
    x = x * 10 + t - '0';
    t = getchar();
  }
  x *= f;
}
const int maxn = 3005;
const int inf = 0x3f3f3f3f;
int n, m, len;
int pre[maxn], fail[maxn];
pair<int, int> from[maxn];
char pat[maxn], str1[maxn], str[maxn];
void input() {
  scanf("%s", str1 + 1);
  scanf("%s", str + 1);
  n = strlen(str1 + 1);
  m = strlen(str + 1);
  memset(pre, inf, sizeof(pre));
}
void getfail() {
  int i = 1, j = 0;
  fail[1] = 0;
  while (i <= len) {
    if (j == 0 || pat[i] == pat[j]) {
      fail[++i] = ++j;
    } else {
      j = fail[j];
    }
  }
}
void kmp(int rev, int st) {
  for (register int i = 1, j = 1; i <= m; i++) {
    while (j > 1 && str[i] != pat[j]) j = fail[j];
    if (str[i] == pat[j]) j++;
    if (j > 1) {
      if (i - j + 2 < pre[i]) {
        pre[i] = i - j + 2;
        if (rev == 0)
          from[i] = make_pair(st, st + j - 2);
        else
          from[i] = make_pair(n - st + 1, n - st - j + 3);
      }
    }
    if (j > len) j = fail[j];
  }
}
void solve() {
  for (register int i = 1; i <= n; i++) {
    len = 0;
    for (register int j = i; j <= n; j++) pat[++len] = str1[j];
    pat[len + 1] = 0;
    getfail();
    kmp(0, i);
  }
  reverse(str1 + 1, str1 + n + 1);
  for (register int i = 1; i <= n; i++) {
    len = 0;
    for (register int j = i; j <= n; j++) pat[++len] = str1[j];
    pat[len + 1] = 0;
    getfail();
    kmp(1, i);
  }
  int ans = 0, cnt = m;
  static vector<pair<int, int> > output;
  while (cnt >= 1) {
    if (pre[cnt] == inf) {
      printf("-1\n");
      return;
    }
    ans++;
    output.push_back(from[cnt]);
    cnt = pre[cnt] - 1;
  }
  printf("%d\n", ans);
  for (register int i = output.size() - 1; i >= 0; i--) {
    printf("%d %d\n", output[i].first, output[i].second);
  }
}
int main() {
  input();
  solve();
  return 0;
}
