#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, long long pos) { return N = N | (1 << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1 << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1 << pos)); }
void CI(long long &_x) { cin >> _x; }
void CO(long long &_x) { cout << _x; }
template <typename T>
void getarray(T a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void prLLIarray(T a[], long long n) {
  for (long long i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
const double EPS = 1e-9;
const long long INF = 0x7f7f7f7f;
long long dr8[8] = {1, -1, 0, 0, 1, -1, -1, 1};
long long dc8[8] = {0, 0, -1, 1, 1, 1, -1, -1};
long long dr4[4] = {0, 0, 1, -1};
long long dc4[4] = {-1, 1, 0, 0};
long long kn8r[8] = {1, 2, 2, 1, -1, -2, -2, -1};
long long kn8c[8] = {2, 1, -1, -2, -2, -1, 1, 2};
string s1, s2, s3;
int lcp[2105][2105];
int lcp_rev[2105][2105];
int main() {
  cin >> s1 >> s2;
  s3 = s1;
  reverse(s3.begin(), s3.end());
  for (int i = s2.size() - 1; i >= 0; i--) {
    for (int j = s1.size() - 1; j >= 0; j--)
      if (s2[i] == s1[j]) {
        lcp[i][j] = 1 + lcp[i + 1][j + 1];
      }
    for (int j = s3.size() - 1; j >= 0; j--)
      if (s2[i] == s3[j]) {
        lcp_rev[i][j] = 1 + lcp_rev[i + 1][j + 1];
      }
  }
  vector<pair<int, int> > V;
  for (int i = 0; i < s2.size();) {
    int maxi = -1, temp;
    int pos;
    for (int j = 0; j < s1.size(); j++) {
      if (maxi < lcp[i][j]) {
        pos = j;
        maxi = lcp[i][j];
        temp = 1;
      }
      if (maxi < lcp_rev[i][j]) {
        pos = j;
        maxi = lcp_rev[i][j];
        temp = 2;
      }
    }
    int j = pos;
    if (maxi == 0) {
      puts("-1");
      return 0;
    }
    if (temp == 1) {
      V.push_back(make_pair(j + 1, j + maxi));
    } else {
      int sz = s1.size();
      V.push_back(make_pair(sz - j, sz - j - maxi + 1));
    }
    i += maxi;
  }
  cout << V.size() << "\n";
  for (int i = 0; i < V.size(); i++)
    cout << V[i].first << " " << V[i].second << "\n";
}
