#include <bits/stdc++.h>
const int N = 2150;
using namespace std;
string st1, st2;
int lcp1[N][N], lcp2[N][N];
int ans[N];
int dp[N];
vector<pair<int, int> > answ;
int par[N];
pair<int, int> memo[N];
int rev(int x) { return st1.size() - x - 1; }
int main() {
  ios_base::sync_with_stdio(0);
  cin >> st1;
  cin >> st2;
  for (int i = st2.size() - 1; i >= 0; i--) {
    for (int j = st1.size() - 1; j >= 0; --j) {
      lcp1[i][j] = lcp1[i + 1][j + 1] + 1;
      if (st2[i] != st1[j]) lcp1[i][j] = 0;
    }
  }
  reverse(st1.begin(), st1.end());
  for (int i = st2.size() - 1; i >= 0; --i) {
    for (int j = st1.size() - 1; j >= 0; --j) {
      lcp2[i][j] = lcp2[i + 1][j + 1] + 1;
      if (st2[i] != st1[j]) {
        lcp2[i][j] = 0;
      }
    }
  }
  for (int i = 0; i < st2.size(); i++) {
    for (int j = 0; j < st1.size(); j++) {
      if (lcp1[i][j] > ans[i]) {
        ans[i] = lcp1[i][j];
        memo[i] = make_pair(j, j + lcp1[i][j] - 1);
      }
    }
  }
  for (int i = 0; i < st2.size(); i++) {
    for (int j = 0; j < st1.size(); j++) {
      if (lcp2[i][j] > ans[i]) {
        ans[i] = lcp2[i][j];
        memo[i] = make_pair(rev(j), rev(j + lcp2[i][j] - 1));
      }
    }
  }
  for (int i = 0; i <= st2.size(); i++) {
    dp[i] = 1e9;
  }
  dp[0] = 0;
  for (int i = 0; i < st2.size(); i++) {
    int to = i + ans[i];
    if (dp[to] > dp[i] + 1) {
      dp[to] = dp[i] + 1;
      par[to] = i;
    }
  }
  if (dp[st2.size()] > 1e8) {
    cout << -1 << endl;
    return 0;
  }
  int cur = st2.size();
  while (cur) {
    int ps = par[cur];
    answ.push_back(memo[ps]);
    cur = ps;
  }
  reverse(answ.begin(), answ.end());
  cout << answ.size() << endl;
  for (int i = 0; i < answ.size(); i++) {
    cout << answ[i].first + 1 << " " << answ[i].second + 1 << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
