#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2, s3, a, b;
  cin >> s1 >> s2;
  s3 = s1;
  reverse(s3.begin(), s3.end());
  int i, j, l1, l2, f;
  vector<pair<int, int> > V;
  pair<int, int> p;
  l1 = s1.length();
  l2 = s2.length();
  a = "";
  for (j = 0; j < l2; j++) {
    a += s2[j];
    f = s1.find(a);
    if (f == -1) {
      f = s3.find(a);
    } else {
      p.first = f + 1;
      p.second = f + 1 + a.size() - 1;
      continue;
    }
    if (f == -1) {
      if (a.size() == 1) {
        cout << -1;
        return 0;
      }
      V.push_back(p);
      j--;
      a.clear();
    } else {
      p.first = f + 1;
      p.second = f + 1 + a.size() - 1;
      p.first = l1 + 1 - p.first;
      p.second = l1 + 1 - p.second;
    }
  }
  V.push_back(p);
  l1 = V.size();
  cout << l1 << endl;
  for (i = 0; i < l1; i++) {
    cout << V[i].first << " " << V[i].second << endl;
  }
  return 0;
}
