#include <bits/stdc++.h>
using namespace std;
struct Info {
  int st, en, len;
};
string s, t, u = "";
vector<pair<int, int> > res;
Info findSubStr(string src, int start) {
  int srcs = src.size(), tsize = t.size(), tmp = start, i = 0;
  Info I = {0, 0, 0};
  for (int i = 0; i < srcs; i++) {
    int tmp = start;
    Info Tmp;
    if (src[i] == t[start]) {
      Tmp.en = Tmp.st = i;
      while (start < tsize && Tmp.en < srcs && t[start] == src[Tmp.en]) {
        start++;
        Tmp.en++;
      }
      Tmp.len = start - tmp, Tmp.st++;
      if (start - tmp > I.len) {
        I = Tmp;
        I.len = start - tmp;
      }
    }
    start = tmp;
  }
  return I;
}
int main() {
  getline(cin, s);
  getline(cin, t);
  for (int i = s.size() - 1; i >= 0; i--) u += s[i];
  int tsize = t.size();
  for (int i = 0; i < tsize; i++) {
    Info T = findSubStr(s, i), U = findSubStr(u, i);
    if (!T.len || !U.len) {
      cout << -1;
      return 0;
    }
    if (U.len > T.len)
      res.push_back(make_pair(s.size() - U.st + 1, s.size() - U.en + 1));
    else
      res.push_back(make_pair(T.st, T.en));
    i += max(T.len, U.len) - 1;
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++)
    cout << res[i].first << " " << res[i].second << endl;
  return 0;
}
