#include <bits/stdc++.h>
using namespace std;
const size_t MAX_N = 1000 * 1000 * 1000 + 1;
string in, rin;
string out;
pair<int, int> find_max(int skip, const string &in, const string &out) {
  int pos = -1, len = 0;
  for (int i = 0; i < in.size(); ++i) {
    int matched = 0;
    for (int j = i; j < in.size() && skip + (j - i) < out.size(); ++j) {
      if (out[skip + j - i] == in[j])
        ++matched;
      else
        break;
    }
    if (matched > len) {
      len = matched;
      pos = i;
    }
  }
  return {pos, len};
}
int main() {
  int i, j, k;
  auto &fs = cin;
  fs >> in >> out;
  rin = in;
  reverse(rin.begin(), rin.end());
  int skip = 0;
  int i1, len1, i2, len2;
  vector<pair<int, int> > result;
  while (skip < out.size()) {
    tie(i1, len1) = find_max(skip, in, out);
    tie(i2, len2) = find_max(skip, rin, out);
    if (len1 > len2) {
      skip += len1;
      result.emplace_back(i1 + 1, i1 + len1);
    } else if (len1 == len2) {
      if (len1 > 0) {
        skip += len1;
        result.emplace_back(i1 + 1, i1 + len1);
      } else
        break;
    } else {
      skip += len2;
      result.emplace_back(rin.size() - i2, rin.size() - (i2 + len2 - 1));
    }
  }
  if (skip != out.size()) {
    cout << -1 << endl;
    return 0;
  }
  cout << result.size() << '\n';
  for (const auto &p : result) {
    cout << p.first << ' ' << p.second << '\n';
  }
  cout.flush();
}
