#include <bits/stdc++.h>
using namespace std;
struct node {
  int l, r;
  int f;
} a[2100];
string s1, s2, s1rev;
int find(string s, int count, int len2, int &fl, int &fr) {
  int len = s.size();
  int j;
  int max = 0;
  int l = 0, r = 0;
  for (int i = 0; i < len; ++i) {
    int flag = 0;
    if (s[i] == s2[count]) {
      flag = 1;
      for (j = 1; j + i < len && j + count < len2; ++j) {
        if (s[i + j] != s2[count + j]) break;
      }
      l = i, r = i + j - 1;
    }
    if (flag && r - l + 1 > max) {
      max = r - l + 1;
      fl = l, fr = r;
    }
  }
  return max;
}
int main() {
  cin >> s1 >> s2;
  s1rev = s1;
  reverse(s1rev.begin(), s1rev.end());
  int len1, len2;
  int l1, l2, r1, r2;
  int count = 0;
  len1 = s1.size();
  len2 = s2.size();
  bool flag = true;
  int ans = 0;
  while (count < len2) {
    int max1 = find(s1, count, len2, l1, r1);
    int max2 = find(s1rev, count, len2, l2, r2);
    ans++;
    if (max1 == 0 && max2 == 0) {
      flag = false;
      break;
    } else if (max1 >= max2) {
      a[ans].l = l1;
      a[ans].r = r1;
      a[ans].f = 1;
      count += max1;
    } else {
      a[ans].l = l2;
      a[ans].r = r2;
      a[ans].f = 0;
      count += max2;
    }
  }
  if (!flag)
    cout << "-1\n";
  else {
    cout << ans << '\n';
    for (int i = 1; i <= ans; ++i) {
      if (a[i].f) {
        cout << a[i].l + 1 << " " << a[i].r + 1 << "\n";
      } else {
        cout << len1 - a[i].l << " " << len1 - a[i].r << "\n";
      }
    }
  }
  return 0;
}
