#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > anss;
int main() {
  string s, t;
  cin >> s >> t;
  for (int x = 0; x < t.size();) {
    int ans = 0, l = 0, r = 0;
    for (int i = 0; i < s.size(); i++) {
      int start = x;
      int ans1 = 0, ans2 = 0;
      for (int j = i; j < s.size() && start < t.size(); j++) {
        if (s[j] == t[start])
          start++, ans1++;
        else
          break;
      }
      start = x;
      for (int j = i; j >= 0 && start < t.size(); j--) {
        if (s[j] == t[start])
          start++, ans2++;
        else
          break;
      }
      if (ans1 > ans2) {
        if (ans1 > ans) {
          ans = ans1;
          l = i;
          r = i + ans1 - 1;
        }
      } else {
        if (ans2 > ans) {
          ans = ans2;
          l = i;
          r = i - ans2 + 1;
        }
      }
    }
    if (ans == 0) return cout << -1, 0;
    anss.push_back({l + 1, r + 1});
    x += ans;
  }
  cout << anss.size() << "\n";
  for (int i = 0; i < anss.size(); i++) {
    cout << anss[i].first << " " << anss[i].second << "\n";
  }
  return 0;
}
