#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  string s_rev(s.rbegin(), s.rend());
  vector<vector<int> > lcp(s.size() + 1, vector<int>(t.size() + 1));
  vector<vector<int> > lcp_rev(s.size() + 1, vector<int>(t.size() + 1));
  for (int i_s = s.size() - 1; i_s >= 0; --i_s) {
    for (int j_t = t.size() - 1; j_t >= 0; --j_t) {
      if (s[i_s] == t[j_t]) {
        lcp[i_s][j_t] = lcp[i_s + 1][j_t + 1] + 1;
      }
      if (s_rev[i_s] == t[j_t]) {
        lcp_rev[i_s][j_t] = lcp_rev[i_s + 1][j_t + 1] + 1;
      }
    }
  }
  vector<pair<int, int> > ans;
  for (int i_t = 0; i_t < t.size();) {
    int cur_max = 0;
    pair<int, int> cand;
    for (int j_s = 0; j_s < s.size(); ++j_s) {
      if (lcp[j_s][i_t] > cur_max) {
        cur_max = lcp[j_s][i_t];
        cand = make_pair(j_s, j_s + cur_max - 1);
      }
      if (lcp_rev[j_s][i_t] > cur_max) {
        cur_max = lcp_rev[j_s][i_t];
        cand =
            make_pair(s.size() - 1 - j_s, s.size() - 1 - (j_s + cur_max - 1));
      }
    }
    if (!cur_max) {
      cout << -1 << endl;
      return 0;
    }
    ans.push_back(cand);
    i_t += cur_max;
  }
  cout << ans.size() << endl;
  for (auto&& pa : ans) {
    cout << (pa.first + 1) << " " << (pa.second + 1) << endl;
  }
  return 0;
}
