#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
inline bool chmin(T1 &a, T2 b) {
  return b < a && (a = b, true);
}
template <class T1, class T2>
inline bool chmax(T1 &a, T2 b) {
  return a < b && (a = b, true);
}
using ll = long long;
const int inf = 1e9;
int dp[2222];
int pre[2222];
int lcp[2222][2222], lcp2[2222][2222];
int main() {
  string s, t;
  cin >> s >> t;
  string u = s;
  reverse(u.begin(), u.end());
  int n = s.size();
  int m = t.size();
  for (int i = (m)-1; i >= (0); i--)
    for (int j = (0); j < (n); j++)
      if (t[i] == s[j]) lcp[i][j] = lcp[i + 1][j + 1] + 1;
  for (int i = (m)-1; i >= (0); i--)
    for (int j = (0); j < (n); j++)
      if (t[i] == u[j]) lcp2[i][j] = lcp2[i + 1][j + 1] + 1;
  for (int i = (0); i < (2222); i++) dp[i] = inf, pre[i] = -1;
  dp[0] = 0;
  for (int i = (0); i < (m); i++) {
    int p = 0, q = 0;
    for (int j = (0); j < (n); j++) {
      chmax(p, lcp[i][j]);
      chmax(q, lcp2[i][j]);
    }
    for (int j = (1); j < (max(p, q) + 1); j++) {
      if (chmin(dp[i + j], dp[i] + 1)) {
        pre[i + j] = i;
      }
    }
  }
  int curr = m;
  vector<pair<int, int>> ans;
  while (pre[curr] != -1) {
    int next = pre[curr];
    int len = curr - next;
    int p = -1, q = -1;
    for (int j = (0); j < (n); j++) {
      if (lcp[next][j] >= len) p = j;
      if (lcp2[next][j] >= len) q = j;
    }
    if (p != -1) {
      ans.emplace_back(p, p + len - 1);
    } else {
      q = n - q - 1;
      ans.emplace_back(q, q - len + 1);
    }
    curr = next;
  }
  if (ans.size() == 0) {
    cout << -1 << endl;
    return 0;
  }
  cout << ans.size() << endl;
  for (int i = (ans.size()) - 1; i >= (0); i--) {
    cout << ans[i].first + 1 << " " << ans[i].second + 1 << endl;
  }
  return 0;
}
