#include <bits/stdc++.h>
using namespace std;
int n, z[6007];
char c[3007];
string s, t, s1, q, p;
vector<pair<int, int> > ans;
void solve() {
  int i, j, l, r, lll;
  gets(c);
  s = c;
  s1 = "";
  for (i = s.size() - 1; i >= 0; i -= 1) {
    s1 += s[i];
  }
  gets(c);
  t = c;
  lll = 0;
  while (lll < t.size()) {
    int ind1 = -1, ind2;
    p = "";
    for (i = lll; i < t.size(); i++) {
      p += t[i];
    }
    for (i = 0; i < 6007; i++) {
      z[i] = 0;
    }
    q = p;
    q += '#';
    q += s;
    z[0] = 0;
    l = 0;
    r = 0;
    for (i = 1; i < q.size(); i++) {
      if (i <= r) z[i] = min(r - i + 1, z[i - l]);
      z[i] = max(0, z[i]);
      while (i + z[i] < q.size() && q[i + z[i]] == q[z[i]]) {
        z[i]++;
      }
      if (i > p.size() && (ind1 == -1 || z[i] > abs(ind1 - ind2)) &&
          z[i] != 0) {
        ind1 = i - p.size() - 1;
        ind2 = i + z[i] - 1 - p.size() - 1;
      }
      if (i + z[i] - 1 > r) {
        l = i;
        r = i + z[i] - 1;
      }
    }
    q = p;
    q += '#';
    q += s1;
    z[0] = 0;
    l = 0;
    r = 0;
    for (i = 0; i < 6007; i++) {
      z[i] = 0;
    }
    for (i = 1; i < q.size(); i++) {
      if (i <= r) z[i] = min(r - i + 1, z[i - l]);
      z[i] = max(0, z[i]);
      while (i + z[i] < q.size() && q[i + z[i]] == q[z[i]]) {
        z[i]++;
      }
      if (i > p.size() && (ind1 == -1 || z[i] > abs(ind1 - ind2)) &&
          z[i] != 0) {
        ind1 = i - p.size();
        ind2 = i + z[i] - 1 - p.size();
        ind1 = s.size() - ind1;
        ind2 = s.size() - ind2;
      }
      if (i + z[i] - 1 > r) {
        l = i;
        r = i + z[i] - 1;
      }
    }
    ans.push_back(make_pair(ind1, ind2));
    if (ind1 == -1) {
      printf("-1");
      return;
    }
    lll += abs(ind1 - ind2) + 1;
  }
  i = 1;
  printf("%d\n", ans.size());
  for (i = 0; i < ans.size(); i++) {
    printf("%d %d\n", ans[i].first + 1, ans[i].second + 1);
  }
}
int main() {
#pragma comment(linker, "/STACK:268435456")
  solve();
  return 0;
}
