#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
string s, t, srev;
int n, m;
void prepare_pattern(const string &pat, vector<int> &T) {
  int n = (int)pat.length();
  T.assign(n + 1, -1);
  for (int i = 1; i <= n; i++) {
    int pos = T[i - 1];
    while (pos != -1 && pat[pos] != pat[i - 1]) pos = T[pos];
    T[i] = pos + 1;
  }
}
vector<pair<int, int> > find_pattern(const string &s, const string &pat,
                                     const vector<int> &T) {
  int sp = 0, kp = 0;
  int slen = (int)s.size(), plen = pat.size();
  vector<pair<int, int> > res(plen + 1, pair<int, int>(-1, -1));
  while (sp < slen) {
    while (kp != -1 && (kp == plen || pat[kp] != s[sp])) kp = T[kp];
    kp++;
    sp++;
    res[kp] = pair<int, int>(sp - kp, sp - 1);
  }
  return res;
}
int memo[3010];
pair<int, int> cons[3010];
int dp(int id) {
  int &res = memo[id];
  if (res != -1) return res;
  if (id == n) return 0;
  res = INF;
  string tmp = string(t.begin() + id, t.end());
  vector<int> T;
  prepare_pattern(tmp, T);
  vector<pair<int, int> > forwards = find_pattern(s, tmp, T);
  vector<pair<int, int> > backwards = find_pattern(srev, tmp, T);
  for (int len = 1; len <= (int)tmp.length(); len++) {
    if (forwards[len].first != -1) {
      if (1 + dp(id + len) < res) {
        res = 1 + dp(id + len);
        cons[id] = forwards[len];
      }
    } else if (backwards[len].first != -1) {
      if (1 + dp(id + len) < res) {
        res = 1 + dp(id + len);
        cons[id] = {m - 1 - backwards[len].first,
                    m - 1 - backwards[len].second};
      }
    }
  }
  return memo[id] = res;
}
int main() {
  cin >> s >> t;
  srev = s;
  reverse(srev.begin(), srev.end());
  n = (int)t.size();
  m = (int)s.size();
  memset(memo, -1, sizeof memo);
  int res = dp(0);
  if (res == INF) {
    cout << "-1\n";
    return 0;
  }
  cout << res << "\n";
  int id = 0;
  while (id < n) {
    pair<int, int> p = cons[id];
    cout << p.first + 1 << ' ' << p.second + 1 << "\n";
    id += abs(p.first - p.second) + 1;
  }
  return 0;
}
