#include <bits/stdc++.h>
using namespace std;
string str, rstr, ans;
int dp[2110][2110][2], rdp[2110][2110];
vector<pair<int, int> > prin;
int rec(int ap, int sp, int t) {
  if (ap == (int)ans.size() || (sp == (int)str.size() && !t) ||
      (sp == (int)rstr.size() && t))
    return 0;
  if ((ans[ap] != str[sp]) && !t) return 0;
  if ((ans[ap] != rstr[sp]) && t) return 0;
  if (dp[ap][sp][t] != -1) return dp[ap][sp][t];
  return dp[ap][sp][t] = 1 + rec(ap + 1, sp + 1, t);
}
int main() {
  ios::sync_with_stdio(false);
  memset(dp, -1, sizeof(dp));
  memset(rdp, -1, sizeof(rdp));
  int a, b, c = 1, n, d, px, py;
  cin >> str;
  cin >> ans;
  n = str.size();
  rstr = str;
  reverse(rstr.begin(), rstr.end());
  for (int i = 0; i <= (int)ans.size() - 1; i++) {
    a = b = 0;
    d = 0;
    for (int j = 0; j <= (int)str.size() - 1; j++) {
      a = max(a, rec(i, j, 0));
      b = max(b, rec(i, j, 1));
      if (a > d) d = a, px = j + 1, py = j + a;
      if (b > d) d = b, py = ((n - j) - b) + 1, px = n - j;
    }
    prin.push_back(make_pair(px, py));
    c = min(c, d);
    i += (d - 1);
    if (!d) break;
  }
  if (c) {
    cout << prin.size() << endl;
    for (int i = 0; i <= (int)prin.size() - 1; i++)
      cout << prin[i].first << ' ' << prin[i].second << endl;
  } else
    cout << -1 << endl;
  return 0;
}
