#include <bits/stdc++.h>
using namespace std;
string str1, str2, str3;
vector<int> v1, v2;
int l, r;
vector<pair<int, int> > v3;
int kmpstart(int a) {
  int sz, p1, p2;
  p2 = 0;
  v2[0] = 0;
  v2[1] = 0;
  for (p1 = 2; p1 <= str2.size(); p1++) {
    p2 = v2[p1 - 1];
    while (1) {
      if (str2[p1 - 1] == str2[p2]) {
        v2[p1] = p2 + 1;
        break;
      } else if (p2 == 0) {
        v2[p1] = 0;
        break;
      } else
        p2 = v2[p2];
    }
  }
}
int kmpfinal1(int a) {
  int sz, p1, p2;
  p1 = 0;
  p2 = 0;
  sz = 0;
  while (1) {
    if (p1 == str1.size()) break;
    if (str1[p1] == str2[p2]) {
      p1++;
      p2++;
      if (sz < p2) {
        sz = p2;
        l = p1 - p2 + 1;
        r = p1;
      }
      if (p2 == str1.size()) break;
    } else if (p2 > 0)
      p2 = v2[p2];
    else
      p1++;
  }
  return sz;
}
int kmpfinal2(int a) {
  int sz, p1, p2;
  p1 = 0;
  p2 = 0;
  sz = 0;
  while (1) {
    if (p1 == str3.size()) break;
    if (str3[p1] == str2[p2]) {
      p1++;
      p2++;
      if (sz < p2) {
        sz = p2;
        l = p1 - p2;
        r = p1 - 1;
      }
      if (p2 == str3.size()) break;
    } else if (p2 > 0)
      p2 = v2[p2];
    else
      p1++;
  }
  return sz;
}
int main() {
  int n, m, p1, p2, chng1, chng2, l1, r1;
  cin >> str1 >> str2;
  for (p1 = str1.size() - 1; p1 >= 0; p1--) str3.push_back(str1[p1]);
  v1.resize(26, 0);
  for (p1 = 0; p1 < str1.size(); p1++) v1[str1[p1] - 'a']++;
  for (p1 = 0; p1 < str2.size(); p1++)
    if (v1[str2[p1] - 'a'] == 0) {
      cout << -1;
      return 0;
    }
  p1 = 0;
  chng1 = 0;
  chng2 = 0;
  while (str2.size() > 0) {
    v2.clear();
    v2.resize(str2.size() + 1, 0);
    l = r = -1;
    kmpstart(p1);
    chng1 = kmpfinal1(p1);
    l1 = l;
    r1 = r;
    chng2 = kmpfinal2(p1);
    if (chng1 >= chng2) {
      p1 += chng1;
      l = l1;
      r = r1;
      str2.erase(0, chng1);
    } else {
      p1 += chng2;
      l = str1.size() - l;
      r = str1.size() - r;
      str2.erase(0, chng2);
    }
    v3.push_back(make_pair(l, r));
  }
  cout << v3.size() << "\n";
  for (p1 = 0; p1 < v3.size(); p1++)
    cout << v3[p1].first << " " << v3[p1].second << "\n";
  return 0;
}
