#include <bits/stdc++.h>
using namespace std;
pair<int, int> maxEqualPart(const string& letters, const string& s, int pos) {
  int maxLen = -1;
  pair<int, int> answer(-1, -1);
  const int& letters_length = letters.length();
  for (int i = 0; i < letters_length && letters_length - i > maxLen; ++i) {
    int len = 0;
    while (i + len < letters.length() && pos + len < s.length() &&
           letters[i + len] == s[pos + len])
      len++;
    if (len > maxLen) {
      maxLen = len;
      answer = make_pair(i, i + len);
    }
  }
  return answer;
}
int main() {
  string s;
  string t;
  cin >> s;
  cin >> t;
  vector<pair<int, int> > segments;
  string rs(s.rbegin(), s.rend());
  int composedLen = 0;
  while (composedLen < t.length()) {
    pair<int, int> ms = maxEqualPart(s, t, composedLen);
    int lenStraight = ms.second - ms.first;
    if (lenStraight == 0) {
      cout << -1 << endl;
      return 0;
    }
    pair<int, int> mr = maxEqualPart(rs, t, composedLen);
    int lenReverse = mr.second - mr.first;
    if (lenStraight >= lenReverse) {
      segments.push_back(make_pair(ms.first + 1, ms.second));
      composedLen += lenStraight;
    } else {
      segments.push_back(
          make_pair(s.length() - mr.first, s.length() - mr.second + 1));
      composedLen += lenReverse;
    }
  }
  printf("%d\n", segments.size());
  for (int i = 0; i < segments.size(); ++i)
    printf("%d %d\n", segments[i].first, segments[i].second);
}
