#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const long long mod = 1e9 + 7;
struct letter {
  int start;
  letter* next[26];
  int depth;
  letter() {
    for (int i = 0; i < 26; i++) next[i] = 0;
    depth = 0;
  }
};
class Trie {
 private:
  letter* root;

 public:
  Trie() { root = new letter(); }
  void insert(string s, int id) {
    letter* cur = root;
    for (int i = 0; i < s.length(); i++) {
      if (cur->next[s[i] - 97] == 0) {
        cur->next[s[i] - 97] = new letter();
        cur->next[s[i] - 97]->start = id;
        cur->next[s[i] - 97]->depth = cur->depth + 1;
      } else
        cur->next[s[i] - 97]->start = id;
      cur = cur->next[s[i] - 97];
    }
  }
  pair<int, int> search(string s) {
    letter* cur = root;
    for (int i = 0; i < s.length(); i++) {
      if (cur->next[s[i] - 97] == 0) {
        if (cur == root) return make_pair((0), (0));
        ;
        return make_pair(cur->start, cur->depth);
      }
      cur = cur->next[s[i] - 97];
    }
    return make_pair(cur->start, cur->depth);
  }
};
int main() {
  Trie t1, t2;
  string s2;
  cin >> s2;
  string s1 = s2;
  int n = s1.length();
  reverse(s2.begin(), s2.end());
  for (int i = 0; i < s1.length(); i++) t1.insert(s1.substr(i), i);
  for (int i = 0; i < s2.length(); i++) t2.insert(s2.substr(i), i);
  string patt;
  cin >> patt;
  int j = 0;
  pair<int, int> p1, p2;
  vector<pair<int, int> > result;
  while (j < patt.length()) {
    p1 = t1.search(patt.substr(j));
    p2 = t2.search(patt.substr(j));
    if (p1.second == 0 && p2.second == 0) {
      puts("-1");
      return 0;
    }
    if (p1.second >= p2.second) {
      result.push_back(make_pair(p1.first + 1, p1.first + p1.second));
      j += p1.second;
    } else {
      result.push_back(make_pair(n - p2.first, n - p2.first - p2.second + 1));
      j += p2.second;
    }
  }
  cout << result.size() << endl;
  for (int i = 0; i < result.size(); i++)
    cout << result[i].first << " " << result[i].second << endl;
}
