#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double EXP = 2.7182818284590452;
const double Pi = 3.14159265;
const double EPS = 1e-13;
const int INF = 1000 * 1000 * 1001;
const long long INFL = (long long)INF * (long long)INF;
map<pair<long long, long long>, long long> hashgcd;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (hashgcd.find(std::make_pair(a, b)) != hashgcd.end())
    return hashgcd[std::make_pair(a, b)];
  while (b != 0) {
    a %= b;
    swap(a, b);
  }
  hashgcd[std::make_pair(a, b)] = a;
  return a;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long extgcd(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x11, y11;
  long long d = extgcd(b % a, a, x11, y11);
  x = y11 - (b / a) * x11;
  y = x11;
  return d;
}
long long poww(long long v, long long p, long long mod) {
  if (p == 0) return 1;
  if (p & 1) {
    return (poww(v, p - 1, mod) * v) % mod;
  } else {
    long long t = poww(v, p / 2, mod);
    return (t * t) % mod;
  }
}
const unsigned long long L31018 = 3000000000000000000L;
string s, t;
string rstr, str;
int cur = 0, len;
int d[10004];
pair<int, int> p1, p2;
vector<std::pair<int, int> > seq;
pair<int, int> kmp(string& S) {
  int l = S.length(), j, mmax = len + 1;
  std::pair<int, int> res = std::make_pair(-1, -1);
  d[cur] = 0;
  for (int i = ((cur + 1)); i < (l); ++i) {
    j = d[i - 1];
    while (j > 0 && S[i] != S[j + cur]) j = d[j - 1 + cur];
    if (S[i] == S[j + cur]) ++j;
    d[i] = j;
  }
  for (int i = ((len + 1)); i < (l); ++i) {
    if (d[mmax] < d[i]) mmax = i;
  }
  if (d[mmax] != 0) {
    res = std::make_pair(mmax - len - d[mmax], mmax - len - 1);
  }
  return res;
}
void accept() {
  cin >> s >> t;
  str = t + "#";
  str += s;
  reverse(s.begin(), s.end());
  rstr = t + "#";
  rstr += s;
  len = t.length();
  while (cur < len) {
    p1 = kmp(str);
    p2 = kmp(rstr);
    if (p1.first == -1 && p2.first == -1) {
      cout << -1;
      return;
    }
    if (p1.second - p1.first >= p2.second - p2.first) {
      seq.push_back(p1);
      cur += p1.second - p1.first + 1;
    } else {
      p1 = p2;
      p2.first = s.length() - p1.first - 1;
      p2.second = s.length() - p1.second - 1;
      seq.push_back(p2);
      cur += p1.second - p1.first + 1;
    }
  }
  cout << seq.size() << "\n";
  for (int i = (0); i < (seq.size()); ++i) {
    printf("%d %d\n", seq[i].first + 1, seq[i].second + 1);
  }
}
int main(void) {
  accept();
  return 0;
}
