#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")
using namespace std;
using ld = long double;
using lli = long long;
using ii = pair<int, int>;
using vi = vector<int>;
struct SuffixAutomaton {
  struct Node : map<char, int> {
    int link = -1;
    int len = 0;
    int pos = 0;
  };
  vector<Node> trie;
  int last;
  SuffixAutomaton() { last = newNode(); }
  int newNode() {
    trie.push_back({});
    return int(trie.size()) - 1;
  }
  void extend(char c) {
    int u = newNode();
    trie[u].len = trie[last].len + 1;
    trie[u].pos = trie[u].len - 1;
    int p = last;
    while (p != -1 && !trie[p].count(c)) {
      trie[p][c] = u;
      p = trie[p].link;
    }
    if (p == -1)
      trie[u].link = 0;
    else {
      int q = trie[p][c];
      if (trie[p].len + 1 == trie[q].len)
        trie[u].link = q;
      else {
        int clone = newNode();
        trie[clone] = trie[q];
        assert(trie[clone].pos == trie[q].pos);
        trie[clone].len = trie[p].len + 1;
        while (p != -1 && trie[p][c] == q) {
          trie[p][c] = clone;
          p = trie[p].link;
        }
        trie[q].link = trie[u].link = clone;
      }
    }
    last = u;
  }
  int leftmost(string &second, int l, int r, int u = 0) {
    int len = r - l + 1;
    for (; l <= r; l++) {
      char c = second[l];
      if (!trie[u].count(c)) return -1;
      u = trie[u][c];
    }
    return trie[u].pos - len + 1;
  }
  Node &operator[](int u) { return trie[u]; }
} sam[2];
const int N = 2101, inf = 1e9;
int mem[N];
string second[2], want;
template <class T>
void umin(T &a, T b) {
  a = min(a, b);
}
int dp(int i) {
  if (i >= int(want.size())) return 0;
  int &ans = mem[i];
  if (ans == -1) {
    ans = inf;
    for (auto k = (0) - ((0) > (2)); k != (2) - ((0) > (2));
         k += 1 - 2 * ((0) > (2))) {
      int u = 0;
      for (int j = i; j < int(want.size()); j++) {
        char c = want[j];
        u = sam[k][u][c];
        if (u == 0) {
          break;
        }
        umin(ans, dp(j + 1) + 1);
      }
    }
  }
  return ans;
}
void solve(int i) {
  if (i >= int(want.size())) {
    cout << '\n';
    return;
  }
  int ans = inf;
  ii go = {-1, -1};
  for (auto k = (0) - ((0) > (2)); k != (2) - ((0) > (2));
       k += 1 - 2 * ((0) > (2))) {
    int u = 0;
    for (int j = i; j < int(want.size()); j++) {
      char c = want[j];
      u = sam[k][u][c];
      if (u == 0) {
        break;
      }
      if (dp(j + 1) + 1 < ans) {
        ans = dp(j + 1) + 1;
        go.first = j;
        go.second = k;
      }
    }
  }
  int len = go.first - i + 1;
  ;
  int pos = sam[go.second].leftmost(want, i, go.first);
  int l = pos + 1, r = pos + len;
  ;
  if (go.second) {
    ;
    cout << int(second[1].size()) - l + 1 << " "
         << int(second[1].size()) - r + 1 << '\n';
  } else {
    ;
    cout << l << " " << r << '\n';
  };
  solve(go.first + 1);
}
int main() {
  cin.tie(0)->sync_with_stdio(0), cout.tie(0);
  while (cin >> second[0] >> want) {
    second[1] = second[0];
    reverse(begin(second[1]), end(second[1]));
    ;
    for (auto k = (0) - ((0) > (2)); k != (2) - ((0) > (2));
         k += 1 - 2 * ((0) > (2))) {
      sam[k] = SuffixAutomaton();
      for (char c : second[k]) sam[k].extend(c);
    }
    memset(mem, -1, sizeof(mem));
    int mn = dp(0);
    if (mn < inf) {
      cout << mn << '\n';
      solve(0);
    } else {
      cout << -1 << '\n';
    }
  }
  return 0;
}
