#include <bits/stdc++.h>
typedef long double ld;
const long long INF = LLONG_MAX;
const long long NINF = LLONG_MIN;
const long long MAX = 1e6 + 5;
const long long MOD = 1e9 + 7;
using namespace std;
inline long long gcd(long long a, long long b) {
  long long t;
  if (a < b) {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  while (b != 0) {
    t = a;
    a = b;
    b = t % b;
  }
  return a;
}
inline long long mpow(long long a, long long b) {
  long long ans = 1;
  while (b != 0) {
    if (b & 1) {
      ans = ans * a;
    }
    a = a * a;
    b >>= 1;
  }
  return ans;
}
long long KMP(string a, string b) {
  char aa[a.size() + 1], bb[b.size() + 1];
  for (long long i = 0; i < a.size(); i++) {
    aa[i] = a[i];
  }
  aa[a.size()] = '\0';
  for (long long i = 0; i < b.size(); i++) {
    bb[i] = b[i];
  }
  bb[b.size()] = '\0';
  if (strstr(bb, aa) != NULL) {
    return strstr(bb, aa) - bb;
  } else {
    return -1;
  }
}
int main() {
  long long c, i, j, k, y, x;
  string s, sx, ss, sxx, s1, s2;
  vector<long long> v;
  c = 0;
  s = "";
  sx = "";
  cin >> s1 >> s2;
  s2 += "*";
  j = 0;
  for (i = 0; i < s2.size(); i++) {
    s = s + s2[i];
    sx = s2[i] + sx;
    if (KMP(s, s1) == -1 && KMP(sx, s1) == -1 && s.size() == 1) {
      cout << "-1\n";
      return 0;
    } else if (KMP(s, s1) == -1 && KMP(sx, s1) == -1) {
      ss = "";
      for (k = 0; k < s.size() - 1; k++) {
        ss += s[k];
      }
      sxx = "";
      for (k = 1; k < sx.size(); k++) {
        sxx += sx[k];
      }
      x = KMP(ss, s1);
      y = KMP(sxx, s1);
      if (x != -1) {
        c++;
        v.push_back(x);
        v.push_back(x + ss.size() - 1);
      } else if (y != -1) {
        c++;
        v.push_back(y + sxx.size() - 1);
        v.push_back(y);
      } else {
        cout << "-1\n";
        return 0;
      }
      s = s2[i];
      sx = s2[i];
    }
  }
  printf("%lld\n", c);
  for (i = 0; i < c; i++) {
    printf("%lld ", v[2 * i] + 1);
    printf("%lld\n", v[2 * i + 1] + 1);
  }
  return 0;
}
