#include <bits/stdc++.h>
using namespace std;
bool isused[26];
string s, t;
vector<pair<int, int> > v;
int abs(int num) {
  if (num < 0)
    return -num;
  else
    return num;
}
int main(void) {
  cin >> s >> t;
  int slen = s.size();
  for (int i = 0; i < slen; i++) isused[(s[i] - 'a')] = true;
  int tlen = t.size();
  for (int i = 0; i < tlen; i++) {
    if (isused[(t[i] - 'a')] == false) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < tlen;) {
    pair<int, int> temp = make_pair(-1, -1);
    for (int j = 0; j < slen; j++) {
      if (t[i] == s[j]) {
        int k1 = 0;
        while (i + k1 + 1 < tlen && j + k1 + 1 < slen &&
               t[i + k1 + 1] == s[j + k1 + 1])
          k1++;
        int k2 = 0;
        while (i + k2 + 1 < tlen && j - k2 - 1 >= 0 &&
               t[i + k2 + 1] == s[j - k2 - 1])
          k2++;
        if (k1 >= k2) {
          if (temp.first == -1)
            temp = make_pair(j, j + k1);
          else if (abs(temp.second - temp.first) < k1)
            temp = make_pair(j, j + k1);
        } else {
          if (temp.first == -1)
            temp = make_pair(j, j - k2);
          else if (abs(temp.first - temp.second) < k2)
            temp = make_pair(j, j - k2);
        }
      }
    }
    if (temp.first <= temp.second)
      i += (temp.second - temp.first) + 1;
    else
      i += (temp.first - temp.second) + 1;
    v.push_back(make_pair(temp.first + 1, temp.second + 1));
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
