#include <bits/stdc++.h>
using namespace std;
string st1, st2;
int a[3000], b[3000];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> st1;
  cin >> st2;
  int l1 = st1.size(), l2 = st2.size(), ans = 0;
  for (int i = 0; i < l2;) {
    int l = 0, z1, z2;
    for (int j = 0; j < l1; ++j) {
      int k;
      for (k = j; k < l1 && i + k - j < l2; ++k)
        if (st1[k] != st2[i + k - j]) break;
      if (l < k - j) {
        l = k - j;
        z1 = j;
        z2 = k - 1;
      }
    }
    for (int j = l1 - 1; j >= 0; --j) {
      int k;
      for (k = j; k >= 0 && i + j - k < l2; --k)
        if (st1[k] != st2[i + j - k]) break;
      if (l < j - k) {
        l = j - k;
        z1 = j;
        z2 = k + 1;
      }
    }
    ++ans;
    a[ans] = z1;
    b[ans] = z2;
    i += l;
    if (l == 0) {
      printf("-1\n");
      return 0;
    }
  }
  printf("%d\n", ans);
  for (int i = 1; i <= ans; ++i) printf("%d %d\n", a[i] + 1, b[i] + 1);
  return 0;
}
