#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000;
struct node {
  int r, l;
} ans[maxn];
int main() {
  string s, t;
  int cnt = 0, flag = 0;
  ios::sync_with_stdio(false);
  cin >> s >> t;
  int len1 = s.length();
  int len2 = t.length();
  int len, l1, rr = 0, ll = 0, k;
  for (int i = 0; i < len2; i++) {
    len = 0;
    for (int j = 0; j < len1; j++) {
      if (t[i] == s[j]) {
        l1 = j;
        for (k = 1; j - k >= 0; k++) {
          if (t[i + k] != s[j - k]) break;
          l1--;
        }
        if (k > len) {
          len = k;
          ll = j;
          rr = l1;
        }
        l1 = j;
        for (k = 1; j + k < len1; k++) {
          if (t[i + k] != s[j + k]) break;
          l1++;
        }
        if (k > len) {
          len = k;
          ll = j;
          rr = l1;
        }
      }
    }
    if (len == 0) {
      flag = 1;
      break;
    }
    i = i + len - 1;
    cnt++;
    ans[cnt].l = ll + 1;
    ans[cnt].r = rr + 1;
  }
  if (flag) {
    printf("-1\n");
  } else {
    printf("%d\n", cnt);
    for (int i = 1; i <= cnt; i++) printf("%d %d\n", ans[i].l, ans[i].r);
  }
  return 0;
}
