#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[2110], b[2110], c[2110];
  cin >> a >> b;
  int la = strlen(a), lb = strlen(b);
  int i, j, p[2110];
  for (i = 0; i < la; i++) c[i] = a[la - i - 1];
  int k1, k2, o1, o2, len = 0, ans[2110][2];
  while (lb = strlen(b), lb) {
    p[0] = j = -1;
    for (i = 1; i < lb; i++) {
      while (j >= 0 && b[j + 1] != b[i]) j = p[j];
      if (b[j + 1] == b[i]) j++;
      p[i] = j;
    }
    j = -1;
    k1 = o1 = 0;
    for (i = 0; i < la; i++) {
      while (j >= 0 && b[j + 1] != a[i]) j = p[j];
      if (b[j + 1] == a[i]) j++;
      if (j >= k1) k1 = j + 1, o1 = i + 1;
    }
    j = -1;
    k2 = o2 = 0;
    for (i = 0; i < la; i++) {
      while (j >= 0 && b[j + 1] != c[i]) j = p[j];
      if (b[j + 1] == c[i]) j++;
      if (j >= k2) k2 = j + 1, o2 = i + 1;
    }
    if (k1 == 0 && k2 == 0) {
      cout << -1;
      return 0;
    }
    if (k1 >= k2) {
      ans[len][0] = o1 - k1 + 1;
      ans[len][1] = o1;
      for (i = k1; i < lb; i++) b[i - k1] = b[i];
      b[lb - k1] = '\0';
    } else {
      ans[len][0] = la - o2 + k2;
      ans[len][1] = la - o2 + 1;
      for (i = k2; i < lb; i++) b[i - k2] = b[i];
      b[lb - k2] = '\0';
    }
    len++;
  }
  cout << len << endl;
  for (i = 0; i < len; i++) cout << ans[i][0] << ' ' << ans[i][1] << endl;
  return 0;
}
