#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false);
  string s, t;
  cin >> s >> t;
  string r = s;
  reverse(r.begin(), r.end());
  s = s + "#" + r;
  t = t + "$";
  vector<int> space;
  vector<pair<int, int>> soln;
  int covered = 0;
  for (int j = 0, length = 0; j < t.length(); j++) {
    if (space.empty()) {
      for (int k = 0; k < s.length(); k++) {
        space.push_back(k - 1);
      }
      length = 0;
    }
    vector<int> newspace;
    for (int k : space) {
      if (k + 1 < s.length() && s[k + 1] == t[j]) {
        newspace.push_back(k + 1);
      }
    }
    if (newspace.empty()) {
      if (length == 0) {
        break;
      } else {
        int x = space.back() - length + 2, y = space.back() + 1;
        if (x > r.length()) {
          soln.emplace_back(s.length() - x + 1, s.length() - y + 1);
        } else {
          soln.emplace_back(x, y);
        }
        covered += length;
        j--;
      }
    } else {
      length++;
    }
    space = newspace;
  }
  if (covered + 1 == t.length()) {
    cout << soln.size() << endl;
    for (auto p : soln) {
      cout << p.first << ' ' << p.second << endl;
    }
  } else {
    cout << -1 << endl;
  }
  return 0;
}
