#include <bits/stdc++.h>
using namespace std;
char a[2200], b[2200], s[2200];
int mx, k, q, i, j, ct1, ct2, t, n, r, tt, p1[2200], p2[2200], ok;
int main() {
  cin >> a;
  cin >> s;
  for (i = 0; a[i] != 0; i++) {
    n++;
  }
  for (i = 0; s[i] != 0; i++) {
    mx = 0;
    r = 0;
    ct1 = 1;
    ct2 = 1;
    for (j = 0; a[j] != 0; j++) {
      if (a[j] == s[i]) {
        ct1 = 1;
        if (1 > mx) {
          mx = 1;
          q = j;
          r = 1;
        }
        for (t = j + 1; a[t] != 0; t++) {
          if (a[t] == s[i + ct1]) {
            ct1++;
            if (ct1 > mx) {
              mx = ct1;
              q = j;
              r = 1;
            }
          } else
            break;
        }
      }
    }
    for (j = n - 1; j >= 0; j--) {
      if (a[j] == s[i]) {
        ct2 = 1;
        if (1 > mx) {
          mx = 1;
          q = j;
          r = 2;
        }
        for (t = j - 1; t >= 0; t--) {
          if (a[t] == s[i + ct2]) {
            ct2++;
            if (ct2 > mx) {
              mx = ct2;
              q = j;
              r = 2;
            }
          } else
            break;
        }
      }
    }
    if (r == 1) {
      tt++;
      p1[tt] = q + 1;
      p2[tt] = q + mx;
      i = i + mx - 1;
    } else if (r == 2) {
      tt++;
      p1[tt] = q + 1;
      p2[tt] = q + 1 - mx + 1;
      i = i + mx - 1;
    } else if (ok == 0) {
      cout << "-1";
      ok = 1;
      break;
    }
  }
  if (ok == 0) {
    cout << tt << "\n";
    for (i = 1; i <= tt; i++) {
      cout << p1[i] << " " << p2[i] << "\n";
    }
  }
}
