#include <bits/stdc++.h>
using namespace std;
struct trie {
  int l, r;
  trie *a[26];
  trie() {
    for (int i = 0; i < 26; i++) a[i] = NULL;
    l = r = -1;
  }
};
trie *root = new trie();
int dp[22222];
pair<int, int> seg[22222];
int pre[22222];
void ins(string s, int beg, int tip) {
  trie *t = root;
  int n = s.size();
  int e = beg, w = beg;
  for (int i = 0; i < n; i++, e++, w--) {
    if (t->a[s[i] - 'a'] == NULL) {
      t->a[s[i] - 'a'] = new trie();
      t->a[s[i] - 'a']->l = beg;
      t->a[s[i] - 'a']->r = (tip ? e : w);
    }
    t = t->a[s[i] - 'a'];
  }
}
int main() {
  string s, t;
  cin >> s >> t;
  int n = s.size(), m = t.size();
  for (int i = 0; i < n; i++) {
    string p = "";
    for (int j = i; j < n; j++) {
      p += s[j];
    }
    ins(p, i, 1);
  }
  for (int i = n - 1; i + 1; i--) {
    string p = "";
    for (int j = i; j + 1; j--) {
      p += s[j];
    }
    ins(p, i, 0);
  }
  for (int i = 0; i < m; i++) {
    dp[i] = -1;
    trie *p = root;
    for (int j = i; j + 1; j--) {
      if (p->a[t[j] - 'a'] == NULL) break;
      p = p->a[t[j] - 'a'];
      if (j && dp[j - 1] == -1) continue;
      int can = (j ? dp[j - 1] : 0) + 1;
      if (can < dp[i] || dp[i] == -1) {
        dp[i] = can;
        seg[i] = make_pair(p->l, p->r);
        pre[i] = j - 1;
      }
    }
  }
  int ans = dp[m - 1];
  cout << ans << endl;
  if (ans == -1) return 0;
  vector<pair<int, int> > sol;
  int x = m - 1;
  while (x >= 0) {
    sol.push_back(seg[x]);
    x = pre[x];
  }
  for (int i = sol.size() - 1; i + 1; i--)
    cout << sol[i].second + 1 << " " << sol[i].first + 1 << endl;
  return 0;
}
