#include <bits/stdc++.h>
using namespace std;
struct data {
  map<char, data*> subData;
  pair<int, int> FL;
  data() {}
  data(pair<int, int> fl) { FL = fl; }
};
int main() {
  string s, t;
  cin >> s;
  data top;
  for (int i = 0; i < s.size(); i++) {
    data* DP = &top;
    for (int j = i; j < s.size(); j++) {
      if (!DP->subData[s[j]])
        DP->subData[s[j]] = new data(make_pair(i + 1, j + 1));
      DP = DP->subData[s[j]];
    }
  }
  for (int i = s.size() - 1; i > -1; i--) {
    data* DP = &top;
    for (int j = i; j > -1; j--) {
      if (!DP->subData[s[j]])
        DP->subData[s[j]] = new data(make_pair(i + 1, j + 1));
      DP = DP->subData[s[j]];
    }
  }
  int i = 0;
  cin >> t;
  vector<pair<int, int>> ans;
  while (i < t.size()) {
    if (!top.subData[t[i]]) break;
    data* DP = &top;
    while (i < t.size() && DP->subData[t[i]]) {
      DP = DP->subData[t[i]];
      i++;
    }
    ans.push_back(DP->FL);
  }
  if (i < t.size())
    cout << -1;
  else {
    cout << ans.size() << endl;
    for (auto a : ans) {
      printf("%d %d\n", a.first, a.second);
    }
  }
  return 0;
}
