#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 have, need;
  cin >> have >> need;
  vector<pair<int, int> > ans;
  bool cant = false;
  while (need.size()) {
    int best = 0, start, end;
    bool is_reversed = false;
    string aux = have;
    reverse(aux.begin(), aux.end());
    vector<int> ans1 = z_function(need + have);
    vector<int> ans2 = z_function(need + aux);
    for (int i = (int)need.size(); i < ans1.size(); i++) {
      if (ans1[i] > best) {
        start = i - need.size();
        end = i + ans1[i] - need.size();
        best = ans1[i];
      }
    }
    for (int i = (int)need.size(); i < ans2.size(); i++) {
      if (ans2[i] > best) {
        start = i - need.size();
        end = i + ans2[i] - need.size();
        best = ans2[i];
        is_reversed = true;
      }
    }
    if (best == 0) {
      cant = true;
      break;
    } else {
      if (end - start >= need.size()) end = start + need.size();
      best = min(best, (int)have.size());
      best = min(best, (int)need.size());
      need = need.substr(best);
      if (!is_reversed)
        ans.push_back(pair<int, int>(start + 1, end));
      else
        ans.push_back(
            pair<int, int>(have.size() - start, have.size() - end + 1));
    }
  }
  if (cant)
    puts("-1");
  else {
    printf("%d\n", (int)ans.size());
    for (int i = 0; i < ans.size(); i++) {
      printf("%d %d\n", ans[i].first, ans[i].second);
    }
  }
  return 0;
}
