#include <bits/stdc++.h>
using namespace std;
string a;
string b;
int lena;
int lenb;
vector<pair<int, int>> R;
int lookup(int i, int j) {
  while (b[++i] == a[++j] && i < lenb && j < lena)
    ;
  return j - 1;
}
int lookdown(int i, int j) {
  while (b[++i] == a[--j] && i < lenb && j >= 0)
    ;
  return j + 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> a >> b;
  lena = a.length();
  lenb = b.length();
  for (int i = 0; i < lenb;) {
    if (i < 0) break;
    int best = 0;
    int p, q;
    for (int j = 0; j < lena; j++) {
      if (a[j] != b[i]) continue;
      int endup = lookup(i, j);
      if (endup - j + 1 > best) {
        best = endup - j + 1;
        p = j;
        q = endup;
      }
      if (i + best == lenb) break;
      int enddown = lookdown(i, j);
      if (j - enddown + 1 > best) {
        best = j - enddown + 1;
        p = j;
        q = enddown;
      }
      if (i + best == lenb) break;
    }
    R.push_back(make_pair(p, q));
    i += best;
    if (best == 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << R.size() << endl;
  for (int i = 0; i < R.size(); i++) {
    cout << R[i].first + 1 << " " << R[i].second + 1 << endl;
  }
  R.clear();
}
