#include <bits/stdc++.h>
using namespace std;
pair<int, int> match(string &s, string &t, int b) {
  int max_len = 0;
  int best_b = -1, best_e = -1;
  for (int i = 0; i < (int)s.length(); ++i) {
    int k;
    for (k = 0; k + i < (int)s.length() && k + b < (int)t.length(); ++k) {
      if (s[i + k] == t[b + k])
        continue;
      else
        break;
    }
    if (k > max_len) {
      max_len = k;
      best_b = i + 1, best_e = i + k;
    }
  }
  pair<int, int> p(best_b, best_e);
  return p;
}
int main() {
  string s, t;
  cin >> s >> t;
  int flag[26] = {0};
  for (int i = 0; i < (int)s.length(); ++i) flag[s[i] - 'a'] = 1;
  bool is_ok = 1;
  for (int i = 0; i < (int)t.length(); ++i)
    if (flag[t[i] - 'a'] == 0) {
      is_ok = 0;
      break;
    }
  if (!is_ok) {
    cout << -1 << endl;
    return 0;
  }
  vector<pair<int, int> > res;
  int n = s.length();
  string s2 = s;
  reverse(s2.begin(), s2.end());
  int b = 0;
  while (b < (int)t.length()) {
    pair<int, int> seg1 = match(s, t, b);
    pair<int, int> seg2 = match(s2, t, b);
    int len1 = abs(seg1.first - seg1.second);
    int len2 = abs(seg2.first - seg2.second);
    if (len1 >= len2) {
      res.push_back(seg1);
      b += len1 + 1;
    } else {
      seg2.first = n + 1 - seg2.first;
      seg2.second = n + 1 - seg2.second;
      res.push_back(seg2);
      b += len2 + 1;
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < (int)res.size(); ++i)
    cout << res[i].first << " " << res[i].second << endl;
  return 0;
}
