#include <bits/stdc++.h>
using namespace std;
int pcnt[27], tcnt[27], lps[2111];
string pat, text, rtext;
pair<int, int> kmpsearch(string txt) {
  int M = pat.length();
  int N = txt.length();
  int mx = 0;
  int j = 0, pos;
  int i = 0;
  while (i < N) {
    if (pat[j] == txt[i]) {
      j++;
      i++;
    }
    if (j > mx) {
      mx = j;
      pos = i - 1;
    }
    if (j == M) {
      break;
    } else if (i < N && pat[j] != txt[i]) {
      if (j != 0)
        j = lps[j - 1];
      else
        i = i + 1;
    }
  }
  return {pos, mx};
}
void countLPS(string pat) {
  int len = 0;
  int i;
  int M = pat.length();
  lps[0] = 0;
  i = 1;
  while (i < M) {
    if (pat[i] == pat[len]) {
      len++;
      lps[i] = len;
      i++;
    } else {
      if (len != 0) {
        len = lps[len - 1];
      } else {
        lps[i] = 0;
        i++;
      }
    }
  }
}
int main() {
  cin >> text >> pat;
  rtext = text;
  reverse(rtext.begin(), rtext.end());
  for (int i = 0; i < text.length(); i++) tcnt[text[i] - 'a']++;
  for (int i = 0; i < pat.length(); i++) pcnt[pat[i] - 'a']++;
  for (int i = 0; i < 26; i++) {
    if (pcnt[i] > 0 && tcnt[i] == 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  int hlen = pat.length();
  pair<int, int> data;
  vector<pair<int, int> > range;
  while (hlen > 0) {
    countLPS(pat);
    data = kmpsearch(text);
    int nlen = data.second;
    int np = data.first;
    data = kmpsearch(rtext);
    int rlen = data.second;
    int rp = data.first;
    if (nlen >= rlen) {
      hlen -= nlen;
      range.push_back({np - nlen + 1, np});
      if (pat.length() > 0) pat = pat.substr(nlen);
    } else {
      hlen -= rlen;
      int sp = rp - rlen + 1;
      sp = text.length() - sp - 1;
      int ep = rp;
      ep = text.length() - ep - 1;
      range.push_back({sp, ep});
      if (pat.length() > 0) pat = pat.substr(rlen);
    }
  }
  cout << range.size() << endl;
  for (auto i : range) {
    cout << i.first + 1 << " " << i.second + 1 << endl;
  }
  return 0;
}
