#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > vrr;
int main() {
  long long l, r, x, i, was, y, le;
  string s, t;
  cin >> s >> t;
  le = 0;
  while (le < t.size()) {
    was = 0;
    for (i = 0; i < s.size(); i++) {
      if (s[i] == t[le]) {
        x = i;
        y = le;
        while ((x < s.size()) && (y < t.size()) && (s[x] == t[y])) {
          x++;
          y++;
        }
        y--;
        x--;
        if (was == 0) {
          l = i;
          r = x;
        } else if (abs(r - l) < abs(i - x)) {
          l = i;
          r = x;
        }
        was = 1;
      }
    }
    for (i = s.size() - 1; i >= 0; i--) {
      if (s[i] == t[le]) {
        x = i;
        y = le;
        while ((0 <= x) && (y < t.size()) && (s[x] == t[y])) {
          x--;
          y++;
        }
        y--;
        x++;
        if (was == 0) {
          l = i;
          r = x;
        } else if (abs(r - l) < abs(i - x)) {
          l = i;
          r = x;
        }
        was = 1;
      }
    }
    if (was == 0) {
      cout << "-1";
      return 0;
    }
    vrr.push_back(make_pair(l, r));
    le += abs(r - l) + 1;
  }
  cout << vrr.size() << '\n';
  for (i = 0; i < vrr.size(); i++) {
    cout << vrr[i].first + 1 << " " << vrr[i].second + 1 << '\n';
  }
  return 0;
}
