#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 10;
string s, t;
string::iterator it;
char ch[N], ch2[N];
int z[N], n, n2, mx, p, p2;
vector<int> res, res2;
void zFunction(long long frst, int lst, char ch[]) {
  int lft = -1, rght = -1, t, i, j, k;
  for (i = frst + 1; i <= lst; i++) {
    if (ch[i] != ch[frst])
      z[i] = 0;
    else if (i > rght) {
      lft = rght = i;
      for (j = i, k = frst; j <= lst && ch[j] == ch[k]; j++, k++) rght = j;
      z[i] = rght - lft + 1;
    } else {
      t = i - lft + frst;
      if (z[t] < rght - i + 1)
        z[i] = z[t];
      else {
        lft = i;
        for (j = rght, k = rght - lft + frst; j <= lst && ch[j] == ch[k];
             j++, k++)
          rght = j;
        z[i] = rght - lft + 1;
      }
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s >> t;
  n = 0;
  for (it = t.begin(); it != t.end(); it++) {
    n++;
    ch[n] = ch2[n] = (*it);
  }
  for (it = s.begin(); it != s.end(); it++) {
    n++;
    ch[n] = (*it);
  }
  n2 = n;
  for (it = s.begin(); it != s.end(); it++) {
    ch2[n2] = (*it);
    n2--;
  }
  for (int i = 1; i <= n2;) {
    zFunction(i, n, ch);
    mx = 0;
    for (int j = n2 + 1, k = 1; j <= n; j++, k++) {
      if (z[j] >= n2 - i + 1) z[j] = n2 - i + 1;
      if (z[j] > mx) {
        mx = z[j];
        p = k;
        p2 = k + z[j] - 1;
      }
    }
    zFunction(i, n, ch2);
    for (int j = n2 + 1, k = n - n2; j <= n; j++, k--) {
      if (z[j] >= n2 - i + 1) z[j] = n2 - i + 1;
      if (z[j] > mx) {
        mx = z[j];
        p = k;
        p2 = k - z[j] + 1;
      }
    }
    if (mx == 0) {
      cout << "-1\n";
      return 0;
    }
    res.push_back(p);
    res2.push_back(p2);
    i += mx;
  }
  cout << res.size() << "\n";
  for (int i = 0; i < res.size(); i++) {
    cout << res[i] << " " << res2[i] << "\n";
  }
  return 0;
}
