#include <bits/stdc++.h>
using namespace std;
string second, t, r = "";
long long n, m, k;
long long lcp[2105][2105], lcp_prev[2105][2105];
pair<long long, long long> ans[2105];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> second >> t;
  n = second.length();
  m = t.length();
  for (long long i = (long long)(n - 1); i >= (long long)(0); i--)
    r += second[i];
  for (long long i = (long long)(m); i >= (long long)(1); i--)
    for (long long j = (long long)(n); j >= (long long)(1); j--)
      if (second[j - 1] == t[i - 1]) lcp[i][j] = lcp[i + 1][j + 1] + 1;
  for (long long i = (long long)(m); i >= (long long)(1); i--)
    for (long long j = (long long)(n); j >= (long long)(1); j--)
      if (r[j - 1] == t[i - 1]) lcp_prev[i][j] = lcp_prev[i + 1][j + 1] + 1;
  for (long long i = (long long)(1); i <= (long long)(m); i++) {
    long long Max = 0, lft, rt;
    lft = rt = -1;
    for (long long j = (long long)(1); j <= (long long)(n); j++) {
      if (lcp[i][j] > Max) {
        Max = lcp[i][j];
        lft = j;
        rt = lft + Max - 1;
      }
    }
    for (long long j = (long long)(1); j <= (long long)(n); j++) {
      if (lcp_prev[i][j] > Max) {
        Max = lcp_prev[i][j];
        lft = n - j + 1;
        rt = lft - Max + 1;
      }
    }
    if (lft == -1) {
      cout << "-1" << endl;
      return 0;
    }
    ans[k] = {lft, rt};
    k++;
    i = i + Max - 1;
  }
  cout << k << endl;
  for (long long i = (long long)(0); i <= (long long)(k - 1); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
