#include <bits/stdc++.h>
class SuffixAutomata {
 public:
  struct state {
    int len, link, pos;
    std::map<char, int> next;
  };
  state st[17000];
  int sz, last;
  void buildSuffixAutomata(std::string str) {
    sz = last = 0;
    st[0].len = 0;
    st[0].pos = -1;
    st[0].link = -1;
    ++sz;
    for (auto c : str) {
      add(c);
    }
  }
  int go(int ver, char c, int &len, int &pos) {
    while (ver != 0 && st[ver].next.find(c) == st[ver].next.end()) {
      ver = st[ver].link;
    }
    if (st[ver].next.find(c) == st[ver].next.end()) {
      len = -1;
      ver = 0;
    } else {
      len = st[ver].len + 1;
      ver = st[ver].next[c];
      pos = st[ver].pos;
    }
    return ver;
  }

 private:
  void add(char c) {
    int cur = sz++;
    st[cur].len = st[last].len + 1;
    st[cur].pos = st[last].pos + 1;
    int p;
    for (p = last; p != -1 && !st[p].next.count(c); p = st[p].link)
      st[p].next[c] = cur;
    if (p == -1)
      st[cur].link = 0;
    else {
      int q = st[p].next[c];
      if (st[p].len + 1 == st[q].len)
        st[cur].link = q;
      else {
        int clone = sz++;
        st[clone].pos = st[cur].pos;
        st[clone].len = st[p].len + 1;
        st[clone].next = st[q].next;
        st[clone].link = st[q].link;
        for (; p != -1 && st[p].next[c] == q; p = st[p].link)
          st[p].next[c] = clone;
        st[q].link = st[cur].link = clone;
      }
    }
    last = cur;
  }
};
void solve() {
  std::string input, output;
  std::cin >> input >> output;
  SuffixAutomata aut;
  std::string base = input + "#";
  std::reverse(input.begin(), input.end());
  base += input;
  aut.buildSuffixAutomata(base);
  int pos = 0, ver = 0, len = 0, alen, ans, lastans = 0;
  std::vector<std::pair<int, int> > moves;
  while (pos < output.size()) {
    bool next;
    ver = aut.go(ver, output[pos], alen, ans);
    if (alen >= len + 1) {
      ++len;
      ++pos;
    } else {
      if (len == 0) {
        std::cout << -1;
        return;
      } else {
        ver = 0;
        moves.push_back(std::pair<int, int>(lastans - len + 1, lastans));
        len = 0;
        ans = 0;
      }
    }
    lastans = ans;
  }
  if (len) {
    moves.push_back(std::pair<int, int>(lastans - len + 1, lastans));
  }
  std::cout << moves.size() << std::endl;
  for (std::pair<int, int> &move : moves) {
    if (move.first > input.size()) {
      move.first -= (input.size() + 1);
      move.second -= (input.size() + 1);
      move.first = input.size() - 1 - move.first;
      move.second = input.size() - 1 - move.second;
    }
    std::cout << move.first + 1 << " " << move.second + 1 << std::endl;
  }
}
int main(int argc, char **argv) {
  solve();
  return 0;
}
