#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 1e6 + 5;
string s, t;
string srev;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s >> t;
  srev = s;
  reverse(srev.begin(), srev.end());
  vector<pair<int, int>> ans;
  while (t.size()) {
    int n = t.size();
    int i = 0;
    string buf;
    for (i = 1; i <= n; i++) {
      string cur = t.substr(0, i);
      if (s.find(cur) == string::npos && srev.find(cur) == string::npos) {
        break;
      } else {
        buf = cur;
      }
    }
    if (i == 1) out(-1);
    if (s.find(buf) != string::npos) {
      int l = s.find(buf);
      int r = l + (int)buf.length() - 1;
      ans.push_back({l + 1, r + 1});
    } else {
      int l = srev.find(buf);
      int r = l + (int)buf.length() - 1;
      int N = s.length();
      l = N - l - 1;
      r = N - r - 1;
      ans.push_back({l + 1, r + 1});
    }
    t = t.substr(i - 1);
  }
  cout << ans.size() << endl;
  for (auto p : ans) {
    cout << p.first << " " << p.second << "\n";
  }
  return 0;
}
