#include <bits/stdc++.h>
using namespace std;
const int oo = 1e9 + 7;
const int N = 1e6 + 10;
vector<pair<int, int> > kq;
string s, t;
pair<int, int> check(int x) {
  int rel = -1;
  int rer = -1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != t[x]) continue;
    int yes = 0;
    while ((i + yes < s.size()) && (x + yes < t.size()))
      if (s[i + yes] == t[x + yes])
        yes++;
      else
        break;
    if (yes != 0) {
      if ((rel == -1) || ((abs(rel - rer) + 1) < yes)) {
        rel = i;
        rer = i + yes - 1;
      }
    }
    yes = 0;
    while ((i - yes >= 0) && (x + yes < t.size()))
      if (s[i - yes] == t[x + yes])
        yes++;
      else
        break;
    if (yes != 0) {
      if ((rel == -1) || ((abs(rel - rer) + 1) < yes)) {
        rel = i;
        rer = i - yes + 1;
      }
    }
  }
  return make_pair(rel, rer);
}
void xuly() {
  int i = 0;
  pair<int, int> x;
  while (i < t.size()) {
    x = check(i);
    if (x.first == -1) {
      cout << -1;
      return;
    }
    kq.push_back(x);
    i += abs(x.first - x.second) + 1;
  }
  cout << kq.size() << "\n";
  for (int k = 0; k < kq.size(); k++) {
    cout << kq[k].first + 1 << " " << kq[k].second + 1 << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> s;
  cin >> t;
  xuly();
}
