#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T min(T a, T b, T c, T d) {
  return min(min(a, b), min(c, d));
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline T max(T a, T b, T c, T d) {
  return max(max(a, b), max(c, d));
}
const int INF = 1e9;
const long long INF_LL = 4e18;
const double pi = acos(-1.0);
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
int nxt[2101][2101], n, m;
char s[2][2101], t[2101];
vector<pair<int, int>> ans;
void init_nxt(char* str, int next[2101]) {
  int i = 0, j = -1;
  next[0] = -1;
  for (i = 0; str[i];) {
    while (j >= 0 && str[i] != str[j]) j = next[j];
    i++;
    j++;
    next[i] = j;
  }
}
pair<int, int> match(char* a, char* b, int next[2101]) {
  int maxl = 0, lft = 0;
  for (int i = 0, j = 0; i < n;) {
    while (j >= 0 && a[i] != b[j]) j = next[j];
    i++;
    j++;
    if (j > maxl) {
      maxl = j;
      lft = i - j;
    }
  }
  return make_pair((lft), (maxl));
}
int main() {
  scanf("%s%s", s[0], t);
  n = (int)strlen(s[0]);
  m = (int)strlen(t);
  for (int i = 0; i < n; i++) s[1][i] = s[0][n - 1 - i];
  for (int i = 0; i < m; i++) init_nxt(t + i, nxt[i]);
  int cur = 0;
  while (cur < m) {
    pair<int, int> x = match(s[0], t + cur, nxt[cur]);
    pair<int, int> y = match(s[1], t + cur, nxt[cur]);
    if (x.second > 0 && x.second >= y.second) {
      ans.push_back(make_pair((x.first + 1), (x.first + x.second)));
      cur += x.second;
    } else if (y.second > 0 && y.second > x.second) {
      int l = n - 1 - y.first;
      int r = n - 1 - (y.first + y.second - 1);
      ans.push_back(make_pair((l + 1), (r + 1)));
      cur += y.second;
    } else
      break;
  }
  if (cur == m) {
    printf("%d\n", int((ans).size()));
    for (auto i : ans) printf("%d %d\n", i.first, i.second);
  } else
    puts("-1");
  return 0;
}
