#include <bits/stdc++.h>
using namespace std;
long lcpts[2500][2500], lcprev[2500][2500];
int main() {
  string s, l;
  cin >> l >> s;
  long m, n;
  m = s.size();
  n = l.size();
  s = "@" + s + "(";
  l = "^" + l + "!";
  for (int i = m; i >= 1; i--) {
    for (int j = n; j >= 1; j--) {
      if (s[i] == l[j]) lcpts[i][j] = lcpts[i + 1][j + 1] + 1;
    }
    for (int j = 1; j <= n; j++) {
      if (s[i] == l[j]) lcprev[i][j] = lcprev[i + 1][j - 1] + 1;
    }
  }
  vector<pair<long, long> > ans;
  for (int i = 1; i <= m;) {
    int i1 = max_element(lcpts[i] + 1, lcpts[i] + n + 1) - lcpts[i];
    int i2 = max_element(lcprev[i] + 1, lcprev[i] + n + 1) - lcprev[i];
    long len = max(lcpts[i][i1], lcprev[i][i2]);
    if (len == 0) {
      cout << "-1";
      return 0;
    }
    if (len == lcpts[i][i1]) {
      ans.push_back({i1, i1 + len - 1});
    } else {
      ans.push_back({i2, i2 - len + 1});
    }
    i += len;
  }
  long len = ans.size();
  cout << len << endl;
  for (int i = 0; i < len; i++)
    cout << ans[i].first << " " << ans[i].second << endl;
}
