#include <bits/stdc++.h>
const int inf = 1e9 + 5;
const long long linf = 5e18 + 5;
const long double eps = 1e-7;
const long long mod = 1e9 + 7;
const int dd = 2e4 + 7;
const int maxn = 2e3 + 10;
using namespace std;
vector<pair<string, int> > qwe;
vector<pair<string, int> > asd;
int main() {
  ios_base::sync_with_stdio(0);
  if (0) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  } else {
    if (!01) {
      freopen(
          "document"
          ".in",
          "r", stdin);
      freopen(
          "document"
          ".out",
          "w", stdout);
    }
  }
  string a, b;
  cin >> a >> b;
  int n = a.size();
  string ra;
  ra = a;
  for (long long i = 0; i < n; ++i) {
    qwe.push_back(make_pair(ra, i));
    ra.pop_back();
    reverse(qwe[i].first.begin(), qwe[i].first.end());
  }
  sort(qwe.begin(), qwe.end());
  ra = a;
  reverse(ra.begin(), ra.end());
  for (long long i = 0; i < n; ++i) {
    asd.push_back(make_pair(ra, i));
    ra.pop_back();
    reverse(asd[i].first.begin(), asd[i].first.end());
  }
  sort(asd.begin(), asd.end());
  vector<pair<int, int> > ans;
  while (b.size()) {
    int qwel = 0;
    int asdl = 0;
    int qwei = -1;
    int asdi = -1;
    {
      int l = 0;
      int r = qwe.size();
      while (l != r - 1) {
        int m = (l + r) / 2;
        if (qwe[m].first > b)
          r = m;
        else
          l = m;
      }
      int lqwe = 0;
      while (lqwe < qwe[l].first.size() && lqwe < b.size() &&
             qwe[l].first[lqwe] == b[lqwe])
        lqwe++;
      if (l != qwe.size() - 1) {
        int lqwe1 = 0;
        while (lqwe1 < qwe[l + 1].first.size() && lqwe1 < b.size() &&
               qwe[l + 1].first[lqwe1] == b[lqwe1]) {
          lqwe1++;
        }
        if (lqwe1 > lqwe) {
          l++;
          lqwe = lqwe1;
        }
      }
      qwel = lqwe;
      qwei = l;
    }
    {
      int l = 0;
      int r = asd.size();
      while (l != r - 1) {
        int m = (l + r) / 2;
        if (asd[m].first > b)
          r = m;
        else
          l = m;
      }
      int lqwe = 0;
      while (lqwe < asd[l].first.size() && lqwe < b.size() &&
             asd[l].first[lqwe] == b[lqwe])
        lqwe++;
      if (l != asd.size() - 1) {
        int lqwe1 = 0;
        while (lqwe1 < asd[l + 1].first.size() && lqwe1 < b.size() &&
               asd[l + 1].first[lqwe1] == b[lqwe1])
          lqwe1++;
        if (lqwe1 > lqwe) {
          l++;
          lqwe = lqwe1;
        }
      }
      asdl = lqwe;
      asdi = l;
    }
    if (asdl == 0 && qwel == 0) {
      cout << -1;
      exit(0);
    }
    if (asdl > qwel) {
      int ind = asd[asdi].second;
      ans.push_back(make_pair(ind + 1, ind + asdl));
      for (long long i = 0; i < asdl; ++i) b.erase(b.begin());
    } else {
      int ind = a.size() - qwe[qwei].second;
      ans.push_back(make_pair(ind, ind - qwel + 1));
      for (long long i = 0; i < qwel; ++i) b.erase(b.begin());
    }
  }
  cout << ans.size() << "\n";
  for (long long i = 0; i < ans.size(); ++i)
    cout << ans[i].first << ' ' << ans[i].second << "\n";
  return 0;
}
