#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using pi = pair<int, int>;
using vs = vector<string>;
using vpi = vector<pi>;
using ll = long long int;
template <typename T>
string tostr(T x) {
  ostringstream oss;
  oss << x;
  return oss.str();
}
template <typename T1, typename T2, typename T3>
T1 modpow(T1 a, T2 p, T3 mod) {
  T1 ret = 1;
  a %= mod;
  for (; p > 0; p /= 2) {
    if (p & 1) ret = 1ll * ret * a % mod;
    a = 1ll * a * a % mod;
  }
  return ret;
}
int dx[]{-1, 0, 1, 0, 1, 1, -1, -1};
int dy[]{0, -1, 0, 1, 1, -1, 1, -1};
constexpr auto PI = 3.14159265358979323846L;
constexpr auto oo = numeric_limits<int>::max() / 2 - 10;
constexpr auto eps = 1e-6;
constexpr auto mod = 1000000007;
string s, t;
vpi ans;
class Trie {
 public:
  pi p;
  Trie* ch[26];
  Trie() {
    p = make_pair(-1, -1);
    for (auto i = 0, _i = (26); i < _i; ++i) ch[i] = NULL;
  }
  pi match(string& s, int i) {
    if (i == (int)(s.size())) return p;
    if (ch[(int)s[i] - 'a'] == NULL) return make_pair(-1, -1);
    return ch[(int)s[i] - 'a']->match(s, i + 1);
  }
} * root;
void solve() {
  int i = 0;
  while (i < (int)(t.size())) {
    int lo = i, hi = (int)(t.size()) - 1;
    while (lo < hi) {
      int m = (lo + hi + 1) / 2;
      string cur = t.substr(i, m - i + 1);
      if (root->match(cur, 0).first != -1) {
        lo = m;
      } else {
        hi = m - 1;
      }
    }
    string cur = t.substr(i, lo - i + 1);
    ;
    if (root->match(cur, 0).first != -1) {
      ans.push_back(root->match(cur, 0));
      i = lo + 1;
    } else {
      ans.clear();
      break;
    }
  }
}
int main() {
  cin >> s >> t;
  root = new Trie();
  for (auto i = 0, _i = ((int)(s.size())); i < _i; ++i) {
    Trie* cur = root;
    for (auto j = i, _j = ((int)(s.size())); j < _j; ++j) {
      if (cur->ch[(int)s[j] - 'a'] == NULL)
        cur->ch[(int)s[j] - 'a'] = new Trie();
      cur = cur->ch[(int)s[j] - 'a'];
      cur->p = make_pair(i, j);
    }
    cur = root;
    for (int j = i; j >= 0; --j) {
      if (cur->ch[(int)s[j] - 'a'] == NULL)
        cur->ch[(int)s[j] - 'a'] = new Trie();
      cur = cur->ch[(int)s[j] - 'a'];
      cur->p = make_pair(i, j);
    }
  }
  solve();
  if ((int)(ans.size()) == 0) {
    printf("-1\n");
  } else {
    printf("%d\n", (int)(ans.size()));
    for (auto entry : ans) {
      printf("%d %d\n", entry.first + 1, entry.second + 1);
    }
  }
  return 0;
}
