#include <bits/stdc++.h>
using namespace std;
long long int inf = 1e18;
long long int p = 1e9 + 7;
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return power(n, p - 2, p);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int i, j, y, x, k, z, w, g, c, key, l, r, n, m;
  long long int l1, l2, r1, r2;
  long long int t2, t3, t4, t1;
  long long int src, end;
  string s, t;
  cin >> s >> t;
  n = s.length();
  m = t.length();
  string srev = s;
  reverse(srev.begin(), srev.end());
  vector<pair<long long int, long long int>> ans;
  for (i = 0; i < m; i++) {
    j = i;
    string str = "";
    long long int f = 0;
    long long int end;
    while (j != m) {
      f = 0;
      str.push_back(t[j]);
      string S;
      for (k = 0; k < str.length(); k++) S.push_back(str[k]);
      S.push_back('%');
      for (k = 0; k < n; k++) S.push_back(s[k]);
      long long int N = S.length();
      vector<long long int> pi(N);
      pi[0] = 0;
      for (long long int ti = 1; ti < N; ti++) {
        long long int tj = pi[ti - 1];
        while (tj > 0 && S[tj] != S[ti]) tj = pi[tj - 1];
        if (S[tj] == S[ti]) tj++;
        pi[ti] = tj;
        if (pi[ti] == j - i + 1) {
          f = 1;
          end = ti - (j - i + 2);
          break;
        }
      }
      if (f == 1)
        j++;
      else
        break;
    }
    if (j == i) {
      cout << "-1";
      return 0;
    }
    long long int j2 = i;
    long long int end2;
    str = "";
    while (j2 != m) {
      f = 0;
      str.push_back(t[j2]);
      string S;
      for (k = 0; k < str.length(); k++) S.push_back(str[k]);
      S.push_back('%');
      for (k = 0; k < n; k++) S.push_back(srev[k]);
      long long int N = S.length();
      vector<long long int> pi(N);
      pi[0] = 0;
      for (long long int ti = 1; ti < N; ti++) {
        long long int tj = pi[ti - 1];
        while (tj > 0 && S[tj] != S[ti]) tj = pi[tj - 1];
        if (S[tj] == S[ti]) tj++;
        pi[ti] = tj;
        if (pi[ti] == j2 - i + 1) {
          f = 1;
          end2 = n - 1 - (ti - (j2 - i + 2));
          break;
        }
      }
      if (f == 1)
        j2++;
      else
        break;
    }
    if (j >= j2) {
      long long int len = j - i;
      ans.push_back(make_pair(end - len + 1, end));
      i = j - 1;
    } else {
      long long int len = j2 - i;
      ans.push_back(make_pair(end2 + len - 1, end2));
      i = j2 - 1;
    }
  }
  cout << ans.size() << "\n";
  for (auto u : ans) cout << u.first + 1 << " " << u.second + 1 << "\n";
  return 0;
}
