#include <bits/stdc++.h>
using namespace std;
char a[2200];
char b[2200];
int ans[2200][2];
int main() {
  cin >> a;
  cin >> b;
  int lena = strlen(a);
  int lenb = strlen(b);
  int process = 0;
  int total = 0;
  while (process < lenb and total != -1) {
    int temp = 0;
    int tempans = 0;
    for (int i = 0; i < lena; i++) {
      if (process + temp < lenb and a[i] == b[process + temp]) {
        temp++;
        if (tempans < temp)
          tempans = temp, ans[total][0] = i + 1 - temp + 1,
          ans[total][1] = i + 1;
      } else {
        if (ans[total][0] != 2 + i - temp and ans[total][1] != i + 1)
          i -= temp - 1;
        temp = 0;
        if (process + temp < lenb and a[i] == b[process + temp]) {
          temp++;
          if (tempans < temp)
            tempans = temp, ans[total][0] = i + 1 - temp + 1,
            ans[total][1] = i + 1;
        }
      }
    }
    temp = 0;
    for (int i = lena - 1; i >= 0; i--) {
      if (process + temp < lenb and a[i] == b[process + temp]) {
        temp++;
        if (tempans < temp)
          tempans = temp, ans[total][0] = i - 1 + temp + 1,
          ans[total][1] = i + 1;
      } else {
        if (ans[total][0] != i - 1 + temp + 1 or ans[total][1] != i + 1)
          i += temp - 1;
        temp = 0;
        if (process + temp < lenb and a[i] == b[process + temp]) {
          temp++;
          if (tempans < temp)
            tempans = temp, ans[total][0] = i - 1 + temp + 1,
            ans[total][1] = i + 1;
        }
      }
    }
    process += tempans;
    total++;
    if (tempans == 0) total = -1;
  }
  if (total == -1)
    cout << -1 << endl;
  else {
    cout << total << endl;
    for (int i = 0; i < total; i++)
      cout << ans[i][0] << " " << ans[i][1] << endl;
  }
}
