#include <bits/stdc++.h>
using namespace std;
vector<int> z_function(string s) {
  int n = (int)s.size();
  vector<int> z(n);
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
int main() {
  string s, t;
  cin >> s >> t;
  string s_reversed = s;
  reverse(s_reversed.begin(), s_reversed.end());
  vector<pair<int, int> > ans;
  int ptr = 0;
  while (ptr != t.size()) {
    pair<int, pair<int, int> > best = make_pair(0, make_pair(0, 0));
    string conc1 = t.substr(ptr, t.size() - ptr) + '$' + s;
    vector<int> v1 = z_function(conc1);
    string conc2 = t.substr(ptr, t.size() - ptr) + '$' + s_reversed;
    vector<int> v2 = z_function(conc2);
    for (int i = t.size() - ptr + 1; i < conc1.size(); i++) {
      best = max(best, make_pair(v1[i], make_pair(i, 1)));
      best = max(best, make_pair(v2[i], make_pair(i, 2)));
    }
    if (best.first == 0) {
      printf("-1\n");
      return 0;
    }
    if (best.second.second == 1) {
      int idx = best.second.first;
      idx -= t.size() - ptr + 1;
      idx++;
      ans.push_back(make_pair(idx, idx + best.first - 1));
    } else {
      int idx = best.second.first;
      idx -= t.size() - ptr + 1;
      idx = s.size() - 1 - idx;
      idx++;
      ans.push_back(make_pair(idx, idx - best.first + 1));
    }
    ptr += best.first;
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d %d\n", ans[i].first, ans[i].second);
  }
  return 0;
}
