#include <bits/stdc++.h>
using namespace std;
char s[2103], t[2103];
pair<int, int> xy[2103];
int ln_s, ln_t, sz, sz1, x, yy, x_tmp, ans;
int main() {
  scanf("%s\n", s);
  scanf("%s\n", t);
  ln_s = strlen(s);
  ln_t = strlen(t);
  t[ln_t] = '%';
  for (int i = (0); i < (ln_t); ++i) {
    int tmp_i = i, ii = i;
    sz1 = sz = 0;
    for (int j = 0, jj = 0; jj < ln_s; ++jj) {
      j = jj;
      sz = 0;
      i = tmp_i;
      if (s[j] != t[i]) {
        ++j;
        continue;
      }
      x_tmp = j;
      while (s[j] == t[i]) ++sz, ++i, ++j;
      if (sz > sz1) {
        sz1 = sz;
        x = x_tmp;
        yy = j - 1;
      }
    }
    for (int j = ln_s - 1, jj = j; jj >= 0; --jj) {
      j = jj;
      sz = 0;
      ii = tmp_i;
      if (s[j] != t[ii]) {
        --j;
        continue;
      }
      x_tmp = j;
      while (j >= 0 && s[j] == t[ii]) ++sz, ++ii, --j;
      if (sz > sz1) {
        sz1 = sz;
        x = x_tmp;
        yy = j + 1;
      }
    }
    if (sz1 == 0) {
      cout << -1;
      return 0;
    }
    i = tmp_i + sz1 - 1;
    xy[ans].first = x;
    xy[ans].second = yy;
    ++ans;
  }
  cout << ans;
  printf("\n");
  for (int i = (0); i < (ans); ++i)
    printf("%d %d ", xy[i].first + 1, xy[i].second + 1), printf("\n");
  return 0;
}
