#include <bits/stdc++.h>
using namespace std;
string reverse(string s) {
  string t = s;
  int slen = s.length();
  for (int i = 0; i < slen; i++) {
    t[slen - 1 - i] = s[i];
  }
  return t;
}
struct st {
  int first, second, x, y;
};
int main() {
  ios_base::sync_with_stdio(false);
  string s, t, srev;
  cin >> s >> t;
  int slen = s.length(), tlen = t.length();
  srev = reverse(s);
  int lcp[tlen][slen], lcpr[tlen][slen];
  for (int i = tlen - 1; i >= 0; --i) {
    if (s[slen - 1] == t[i]) {
      lcp[i][slen - 1] = 1;
    } else {
      lcp[i][slen - 1] = 0;
    }
    for (int j = slen - 2; j >= 0; --j) {
      if (s[j] == t[i]) {
        if (i + 1 < tlen) {
          lcp[i][j] = lcp[i + 1][j + 1] + 1;
        } else {
          lcp[i][j] = 1;
        }
      } else {
        lcp[i][j] = 0;
      }
    }
  }
  for (int i = tlen - 1; i >= 0; --i) {
    if (srev[slen - 1] == t[i]) {
      lcpr[i][slen - 1] = 1;
    } else {
      lcpr[i][slen - 1] = 0;
    }
    for (int j = slen - 2; j >= 0; --j) {
      if (srev[j] == t[i]) {
        if (i + 1 < tlen) {
          lcpr[i][j] = lcpr[i + 1][j + 1] + 1;
        } else {
          lcpr[i][j] = 1;
        }
      } else {
        lcpr[i][j] = 0;
      }
    }
  }
  st ans[tlen];
  for (int i = 0; i < tlen; i++) {
    ans[i].first = 0;
    ans[i].second = 0;
    ans[i].x = 0;
    ans[i].y = 0;
    for (int j = 0; j < slen; j++) {
      if (lcp[i][j] >= lcp[i][ans[i].first]) {
        ans[i].first = j;
        ans[i].x = j + 1;
        ans[i].y = j + lcp[i][j];
      }
    }
    for (int j = 0; j < slen; j++) {
      if (lcpr[i][j] >= lcp[i][ans[i].first] && ans[i].second == 0) {
        ans[i].first = j;
        ans[i].second = 1;
        ans[i].x = slen - j;
        ans[i].y = slen - j - lcpr[i][j] + 1;
      } else {
        if (lcpr[i][j] >= lcpr[i][ans[i].first] && ans[i].second == 1) {
          ans[i].first = j;
          ans[i].x = slen - j;
          ans[i].y = slen - j - lcpr[i][j] + 1;
        }
      }
    }
  }
  int total = 0;
  vector<pair<int, int> > v;
  for (int i = 0; i < tlen; i++) {
    if (lcp[i][ans[i].first] > 0 && ans[i].second == 0) {
      ++total;
      v.push_back(make_pair(ans[i].x, ans[i].y));
      i += (lcp[i][ans[i].first] - 1);
    } else {
      if (lcpr[i][ans[i].first] > 0 && ans[i].second == 1) {
        ++total;
        v.push_back(make_pair(ans[i].x, ans[i].y));
        i += (lcpr[i][ans[i].first] - 1);
      } else {
        total = -1;
        break;
      }
    }
  }
  cout << total << endl;
  if (total > 0) {
    for (int i = 0; i < v.size(); i++) {
      cout << v[i].first << " " << v[i].second << endl;
    }
  }
}
