#include <bits/stdc++.h>
using namespace std;
int main() {
  string start, end;
  cin >> start >> end;
  string srev = start;
  reverse(srev.begin(), srev.end());
  vector<int> vs[26], vr[26];
  int slen = start.length();
  for (int i = 0; i < slen; i++) {
    vs[start[i] - 'a'].push_back(i);
    vr[srev[i] - 'a'].push_back(i);
  }
  int elen = end.length();
  bool flag = true;
  for (int i = 0; i < elen; i++) {
    if (vs[end[i] - 'a'].size() == 0) {
      flag = false;
      break;
    }
  }
  if (!flag)
    cout << -1 << endl;
  else {
    int no = 0;
    vector<pair<int, int> > res;
    for (int i = 0; i < elen;) {
      int size = vs[end[i] - 'a'].size();
      pair<int, int> p;
      int maxl, ans = 0, index, tmp;
      for (int j = 0; j < size; j++) {
        index = vs[end[i] - 'a'][j];
        tmp = index;
        maxl = i;
        while ((index < slen - 1) && (maxl < elen - 1) &&
               start[index + 1] == end[maxl + 1]) {
          index++;
          maxl++;
        }
        if (maxl - i + 1 > ans) {
          ans = maxl - i + 1;
          p = make_pair(tmp, index);
        }
      }
      maxl = i;
      for (int j = 0; j < size; j++) {
        index = vr[end[i] - 'a'][j];
        tmp = index;
        maxl = i;
        while ((index < slen - 1) && (maxl < elen - 1) &&
               srev[index + 1] == end[maxl + 1]) {
          index++;
          maxl++;
        }
        if (maxl - i + 1 > ans) {
          ans = maxl - i + 1;
          p = make_pair(slen - 1 - tmp, slen - 1 - index);
        }
      }
      i += ans;
      no++;
      res.push_back(p);
    }
    cout << no << endl;
    for (int i = 0; i < res.size(); i++)
      cout << res[i].first + 1 << " " << res[i].second + 1 << endl;
  }
}
