#include <bits/stdc++.h>
using namespace std;
int a[26], b[26], x, y, i, p, q, j, z, alp, tt, k;
vector<pair<int, int> > vec;
int main() {
  string s, t, temp;
  cin >> s >> t;
  temp = s;
  for (i = 0; i < s.length(); i++) a[s[i] - 97]++;
  for (i = 0; i < t.length(); i++) b[t[i] - 97]++;
  for (i = 0; i < 26; i++)
    if (b[i] != 0 && a[i] == 0) {
      cout << "-1";
      return 0;
    }
  x = s.length();
  y = t.length();
  i = 0;
  while (i < y) {
    alp = i;
    for (j = 0; j < x; j++) {
      k = j, i = alp;
      while (k < x && i < y && t[i] == s[k]) {
        i++;
        k++;
      }
      if (z < i) {
        z = i;
        p = j;
        q = k - 1;
      }
    }
    for (j = x - 1; j >= 0; j--) {
      k = j, i = alp;
      while (k >= 0 && i < y && t[i] == s[k]) {
        i++;
        k--;
      }
      if (z < i) {
        z = i;
        p = j;
        q = k + 1;
      }
    }
    vec.push_back(make_pair(p, q));
    tt++;
    i = z;
  }
  cout << vec.size() << endl;
  for (i = 0; i < vec.size(); i++) {
    cout << vec[i].first + 1 << " " << vec[i].second + 1 << endl;
  }
}
