#include <bits/stdc++.h>
template <typename T>
using Vector2D = std::vector<std::vector<T>>;
template <typename T>
using Vector3D = std::vector<Vector2D<T>>;
using PairInt = std::pair<int, int>;
using PairInt64 = std::pair<int64_t, int64_t>;
using MapInt = std::map<int, int>;
using MMapInt = std::multimap<int, int>;
using MMapInt64 = std::multimap<int64_t, int64_t>;
using UMapIntString = std::unordered_map<int, std::string>;
using SetInt = std::set<int>;
using SetPairInt64 = std::set<PairInt64>;
using VectorInt = std::vector<int>;
using VectorInt2D = Vector2D<int>;
using VectorInt64 = std::vector<int64_t>;
using VectorUInt64 = std::vector<uint64_t>;
using VectorInt642D = Vector2D<int64_t>;
using VectorChar = std::vector<char>;
using VectorChar2D = Vector2D<char>;
using VectorString = std::vector<std::string>;
using QueuePairInt = std::queue<PairInt>;
using QueueInt = std::queue<int>;
using VectorPairInt = std::vector<PairInt>;
using VectorPairInt64 = std::vector<PairInt64>;
using VectorPairInt2D = Vector2D<PairInt>;
using SetInt = std::set<int>;
using MSetInt = std::multiset<int>;
using UMapChar = std::map<char, int>;
using ListInt = std::list<int>;
using VectorListInt = std::vector<ListInt>;
using VectorDouble = std::vector<double>;
VectorInt calc_prefix_function(const std::string& str) {
  const size_t str_length = str.size();
  VectorInt prefix_func(str_length);
  if (0 == str_length) return prefix_func;
  prefix_func[0] = 0;
  for (size_t current = 1; current < str_length; ++current) {
    size_t matched_prefix = current - 1;
    size_t candidate = prefix_func[matched_prefix];
    while (candidate != 0 && str[current] != str[candidate]) {
      matched_prefix = prefix_func[matched_prefix] - 1;
      candidate = prefix_func[matched_prefix];
    }
    if (candidate == 0)
      prefix_func[current] = str[current] == str[0] ? 1 : 0;
    else
      prefix_func[current] = candidate + 1;
  }
  return prefix_func;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::string s;
  std::string t;
  std::string sb;
  std::cin >> s >> t;
  sb = s;
  std::reverse(sb.begin(), sb.end());
  if (t.length() == 0) {
    std::cout << "0";
    return 0;
  } else if (s.length() == 0) {
    std::cout << "-1";
    return 0;
  }
  VectorPairInt ans = {{-1, -1}};
  int sz = t.length();
  for (int i = 1, j = 0; i <= sz && j < sz;) {
    int len = i - j;
    auto tm = t.substr(j, len) + '$';
    auto prefix_f = calc_prefix_function(tm + s);
    auto prefix_b = calc_prefix_function(tm + sb);
    auto itf = std::find(prefix_f.begin(), prefix_f.end(), len);
    auto itb = std::find(prefix_b.begin(), prefix_b.end(), len);
    if (itf != prefix_f.end()) {
      int idx = itf - prefix_f.begin() - len;
      ans.back() = {idx - len + 1, idx};
      ++i;
    } else if (itb != prefix_b.end()) {
      int szs = s.length();
      int idx = szs - ((itb - prefix_b.begin()) - len) + 1;
      ans.back() = {idx + len - 1, idx};
      ++i;
    } else if (ans.back() == PairInt(-1, -1)) {
      std::cout << "-1";
      return 0;
    } else {
      j = i - 1;
      if (i <= sz && j < sz) ans.emplace_back(-1, -1);
    }
  }
  std::cout << ans.size() << "\n";
  for (auto& p : ans) {
    std::cout << p.first << " " << p.second << "\n";
  }
  return 0;
}
