#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9 + 7;
const int MAXA = 1e5 + 10;
const long long MOD = (long long)1e9 + 7;
const long long INFLL = 9e18 + 7;
string s, sr, t;
vector<pair<int, int> > ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s >> t;
  sr = s;
  reverse(sr.begin(), sr.end());
  for (int(j) = (0); (j) <= (t.length() - 1); (j)++) {
    int mx = 0;
    int x = -1, y = -1;
    for (int(i) = (1); (i) <= (min(s.length(), t.length())); (i)++) {
      string temp = t.substr(j, i);
      size_t pos = s.find(temp);
      if (i > mx && pos != string::npos) {
        x = pos;
        y = pos + temp.length() - 1;
        mx = i;
      } else if (pos == string::npos)
        break;
    }
    for (int(i) = (1); (i) <= (min(s.length(), t.length())); (i)++) {
      string temp = t.substr(j, i);
      size_t pos = sr.find(temp);
      if (i > mx && pos != string::npos) {
        x = s.length() - pos - 1;
        y = x - temp.length() + 1;
        mx = i;
      } else if (pos == string::npos)
        break;
    }
    if (mx == 0) return cout << "-1", 0;
    j += mx - 1;
    ans.push_back(pair<int, int>(x, y));
  }
  cout << ans.size() << endl;
  for (int(i) = (0); (i) <= (ans.size() - 1); (i)++) {
    cout << ++ans[i].first << " " << ++ans[i].second << endl;
  }
  return 0;
}
