#include <bits/stdc++.h>
using namespace std;
long long modulo(long long a, long long b, long long c) {
  long long x = 1LL, y = a;
  while (b > 0LL) {
    if (b % 2LL == 1LL) {
      x = (x * y) % c;
    }
    y = (y * y) % c;
    b /= 2LL;
  }
  return x % c;
}
int lps[2109][2109];
void computeLPSArray(char *pat, int st, int M) {
  int len = st;
  int i;
  lps[st][st] = st;
  i = st + 1;
  while (i < M) {
    if (pat[i] == pat[len]) {
      len++;
      lps[st][i] = len;
      i++;
    } else {
      if (len != st)
        len = lps[st][len - 1];
      else {
        lps[st][i] = st;
        i++;
      }
    }
  }
}
int KMPSearch(char *txt, char *pat, int st, int en) {
  int N = strlen(txt);
  int M = en + 1;
  int j = st;
  int i = 0;
  while (i < N) {
    if (pat[j] == txt[i]) {
      j++;
      i++;
    }
    if (j == M) {
      return 1;
      j = lps[st][j - 1];
    } else if (i < N && pat[j] != txt[i]) {
      if (j != st)
        j = lps[st][j - 1];
      else
        i = i + 1;
    }
  }
  return 0;
}
int func(char *txt, char *pat, int st, int en) {
  int N = strlen(txt);
  int M = en + 1;
  int j = st;
  int i = 0;
  while (i < N) {
    if (pat[j] == txt[i]) {
      j++;
      i++;
    }
    if (j == M) {
      return (i - (en - st + 1));
      j = lps[st][j - 1];
    } else if (i < N && pat[j] != txt[i]) {
      if (j != st)
        j = lps[st][j - 1];
      else
        i = i + 1;
    }
  }
  return -1;
}
char s1[100011], s2[10001], s3[10011];
int dp[10011], par[10011], n1[10011], n2[10011];
vector<pair<int, int> > v;
int c[50];
int main() {
  gets(s1);
  gets(s2);
  int i, j, n = strlen(s1), m = strlen(s2);
  for (i = 0; i < n; i++) c[s1[i] - 'a'] = 1;
  for (i = 0; i < m; i++)
    if (c[s2[i] - 'a'] == 0) break;
  if (i != m) {
    printf("-1\n");
    return 0;
  }
  for (i = 0; i < n; i++) s3[i] = s1[n - i - 1];
  s3[n] = '\0';
  for (i = 0; i < m; i++) computeLPSArray(s2, i, m);
  for (j = 0; j < m; j++) dp[j] = 1000000000;
  for (i = 0; i < m; i++) {
    int l = 1, r = m - i, ans = 0;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (KMPSearch(s1, s2, i, i + mid - 1) ||
          KMPSearch(s3, s2, i, i + mid - 1))
        ans = max(ans, mid), l = mid + 1;
      else
        r = mid - 1;
    }
    for (j = i; j < i + ans; j++) {
      int y;
      if (i == 0)
        y = 0;
      else
        y = dp[i - 1];
      if (y + 1 < dp[j]) {
        dp[j] = y + 1;
        par[j] = i - 1;
        int y = func(s1, s2, i, j);
        if (y == -1) {
          y = func(s3, s2, i, j);
          y = n - y - 1;
          n2[j] = y - (j - i);
          n1[j] = y;
        } else {
          n1[j] = y;
          n2[j] = y + (j - i);
        }
      }
    }
  }
  if (dp[m - 1] == 1000000000) {
    printf("-1\n");
    return 0;
  }
  i = m - 1;
  while (i != -1) {
    v.push_back(make_pair(n1[i], n2[i]));
    i = par[i];
  }
  printf("%d\n", v.size());
  reverse(v.begin(), v.end());
  for (i = 0; i < v.size(); i++)
    printf("%d %d\n", v[i].first + 1, v[i].second + 1);
  return 0;
}
