#include <bits/stdc++.h>
using namespace std;
inline int add(int a, int b, int m = 1000000007) {
  a += b;
  if (a >= m) a -= m;
  return a;
}
inline int mul(int a, int b, int m = 1000000007) {
  return (int)(((long long)a * (long long)b) % m);
}
inline int norm(int x, int m = 1000000007) {
  if (x >= m) x %= m;
  if (x < 0) x += m;
  return x;
}
inline int neg(int x, int m = 1000000007) {
  x = -x;
  return norm(x);
}
vector<int> z_function(string s) {
  int n = s.length();
  vector<int> z(n);
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < n && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s >> t;
  int ns, nt;
  ns = int((s).size()), nt = int((t).size());
  string sr = s;
  reverse((sr).begin(), (sr).end());
  int i = 0;
  vector<pair<int, int> > yay;
  bool gg = 0;
  while (i < nt) {
    string a, b;
    for (int j = i; j <= nt - 1; ++j) a += t[j];
    a += "#";
    b = a;
    a += s;
    b += sr;
    vector<int> za = z_function(a);
    vector<int> zb = z_function(b);
    int val = 0;
    pair<int, int> ans;
    for (int j = nt + 1 - i; j <= int((za).size()) - 1; ++j) {
      if (za[j] > val) {
        val = za[j];
        ans.first = j - (nt + 1 - i);
        ans.second = j - (nt + 1 - i) + za[j] - 1;
      }
    }
    for (int j = nt + 1 - i; j <= int((zb).size()) - 1; ++j) {
      if (zb[j] > val) {
        val = zb[j];
        ans.first = j - (nt + 1 - i);
        ans.second = j - (nt + 1 - i) + zb[j] - 1;
        ans.first = ns - ans.first - 1;
        ans.second = ns - ans.second - 1;
        if (ans.first <= ans.second) swap(ans.first, ans.second);
      }
    }
    i += val;
    if (val == 0) {
      cout << "-1\n";
      return 0;
    }
    yay.push_back(ans);
  }
  cout << int((yay).size()) << "\n";
  for (auto it = (yay).begin(); it != (yay).end(); ++it) {
    cout << it->first + 1 << " " << it->second + 1 << "\n";
  }
  return 0;
}
