#include <bits/stdc++.h>
using namespace std;
int f[3000];
void buildfail(char *p, int l) {
  for (int i = 0; i < l; i++) f[i] = -1;
  int q = -1;
  for (int i = 1; i < l; i++) {
    while (q > -1 && p[q + 1] != p[i]) q = f[q];
    if (p[q + 1] == p[i]) q++;
    f[i] = q;
  }
}
int lf, rh;
int len = 0;
int kmp(char *p, char *s, int l1, int l2) {
  buildfail(p, l1);
  int q = -1;
  for (int i = 0; i < l2; i++) {
    while (q > -1 && p[q + 1] != s[i]) q = f[q];
    if (p[q + 1] == s[i]) q++;
    if (q + 1 > len) {
      len = q + 1;
      lf = i - len + 1;
      rh = i;
    }
    if (q == l1 - 1) {
      return l1;
      q = f[q];
    }
  }
  return len;
}
char str[2105], pat[2105], strr[2105];
bool tag[26];
vector<pair<int, int> > res;
int main() {
  scanf(" %s", str);
  int l2 = strlen(str);
  scanf(" %s", pat);
  int l1 = strlen(pat);
  for (int i = 0; i <= (l2 - 1); i++) tag[str[i] - 'a'] = true;
  for (int i = 0; i <= (l1 - 1); i++)
    if (!tag[pat[i] - 'a']) {
      cout << "-1" << endl;
      return 0;
    }
  for (int i = 0; i <= (l2 - 1); i++) strr[i] = str[l2 - 1 - i];
  int cnt = 0;
  while (cnt < l1) {
    len = 0;
    int l11 = kmp(pat + cnt, str, l1 - cnt, l2);
    int l22 = kmp(pat + cnt, strr, l1 - cnt, l2);
    if (l11 < l22) {
      lf = l2 - lf - 1;
      rh = l2 - rh - 1;
    }
    res.push_back(make_pair(lf, rh));
    cnt = cnt + len;
  }
  cout << res.size() << endl;
  for (int i = 0; i <= (res.size() - 1); i++)
    cout << res[i].first + 1 << " " << res[i].second + 1 << endl;
}
