#include <bits/stdc++.h>
using namespace std;
string s, t, revs;
int m, n;
int lcp[2105][2105], revlcp[2105][2105];
void build_lcp() {
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (t[i] == s[j]) lcp[i][j] = lcp[i - 1][j - 1] + 1;
    }
    for (int j = 1; j <= n; j++) {
      if (t[i] == revs[j]) revlcp[i][j] = revlcp[i - 1][j - 1] + 1;
    }
  }
}
vector<pair<int, int> > ans;
int main() {
  std::ios::sync_with_stdio(false);
  cin >> s >> t;
  revs = s;
  reverse(revs.begin(), revs.end());
  n = s.length();
  m = t.length();
  s = "*" + s;
  t = "*" + t;
  revs = "*" + revs;
  build_lcp();
  int i = m;
  while (i > 0) {
    int max1 = 0, pos1, max2 = 0, pos2;
    for (int j = 1; j <= n; j++) {
      if (max1 < lcp[i][j]) {
        max1 = lcp[i][j];
        pos1 = j;
      }
    }
    for (int j = 1; j <= n; j++) {
      if (max2 < revlcp[i][j]) {
        max2 = revlcp[i][j];
        pos2 = j;
      }
    }
    if (max1 == 0 && max2 == 0) {
      cout << "-1";
      return 0;
    }
    if (max1 >= max2) {
      ans.push_back(make_pair(pos1 - max1 + 1, pos1));
      i = i - max1;
    } else {
      ans.push_back(make_pair(n - (pos2 - max2 + 1) + 1, n - pos2 + 1));
      i = i - max2;
    }
  }
  int sz = ans.size();
  cout << sz << endl;
  for (int j = sz - 1; j >= 0; j--)
    cout << ans[j].first << " " << ans[j].second << endl;
  return 0;
}
