#include <bits/stdc++.h>
using namespace std;
int main() {
  int ns, nt, i, j, l, a;
  string s, t, rs;
  vector<pair<int, int>> ans;
  cin >> s;
  cin >> t;
  rs = s;
  reverse(rs.begin(), rs.end());
  ns = s.size();
  nt = t.size();
  for (i = 0; i < nt;) {
    int maior = 0;
    int j2;
    pair<int, int> cur = {-1, -1};
    for (j = 0; j < ns; j++) {
      if (s[j] == t[i]) {
        l = i + 1;
        j2 = j + 1;
        while (j2 < ns && l < nt && s[j2] == t[l]) {
          l++;
          j2++;
        }
        if (l - i > maior) {
          maior = l - i;
          cur = {j + 1, j2};
        }
      }
    }
    for (j = 0; j < ns; j++) {
      if (rs[j] == t[i]) {
        l = i + 1;
        j2 = j + 1;
        while (j2 < ns && l < nt && rs[j2] == t[l]) {
          l++;
          j2++;
        }
        if (l - i > maior) {
          maior = l - i;
          cur = {ns - (j + 1) + 1, ns - j2 + 1};
        }
      }
    }
    if (!maior) {
      printf("-1\n");
      return 0;
    }
    ans.push_back(cur);
    i += maior;
  }
  printf("%d\n", (int)ans.size());
  for (auto x : ans) {
    printf("%d %d\n", x.first, x.second);
  }
  return 0;
}
