#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > mem[2101];
int kmp(const string &needle, const string &haystack) {
  int m = needle.size();
  vector<int> border(m + 1);
  border[0] = -1;
  for (int i = 0; i < m; ++i) {
    border[i + 1] = border[i];
    while (border[i + 1] > -1 && needle[border[i + 1]] != needle[i]) {
      border[i + 1] = border[border[i + 1]];
    }
    border[i + 1]++;
  }
  int n = haystack.size();
  int seen = 0;
  for (int i = 0; i < n; ++i) {
    while (seen > -1 && needle[seen] != haystack[i]) {
      seen = border[seen];
    }
    if (++seen == m) {
      return i - m + 1;
      seen = border[m];
    }
  }
  return -1;
}
int main() {
  string s, t;
  cin >> s >> t;
  bool vis[t.size()];
  vector<pair<int, int> > ret;
  string str1 = "", str2 = "";
  int i = 0;
  pair<int, int> p = make_pair(-1, -1);
  while (i < t.size()) {
    str1 += t[i];
    str2 = t[i] + str2;
    int a = kmp(str1, s), b = kmp(str2, s);
    if (a == -1 && b == -1) {
      if (p.first == -1) {
        cout << -1 << endl;
        return 0;
      }
      ret.push_back(p);
      p.first = -1;
      str1 = str2 = "";
      continue;
    }
    if (a != -1) {
      p = make_pair(a, a + str1.size() - 1);
    } else {
      p = make_pair(b + str2.size() - 1, b);
    }
    i++;
  }
  if (p.first == -1) {
    cout << -1 << endl;
    return 0;
  } else
    ret.push_back(p);
  cout << ret.size() << endl;
  for (int i = 0; i < ret.size(); i++)
    cout << ret[i].first + 1 << " " << ret[i].second + 1 << endl;
}
