#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;
}
void computeLPSArray(string, long long M, long long *lps);
long long KMP(string pat, string txt) {
  long long M = pat.size();
  long long N = txt.size();
  long long *lps = (long long *)malloc(sizeof(long long) * M);
  long long j = 0;
  computeLPSArray(pat, M, lps);
  long long i = 0;
  while (i < N) {
    if (pat[j] == txt[i]) {
      j++;
      i++;
    }
    if (j == M) {
      return i - j;
      j = lps[j - 1];
    } else if (i < N && pat[j] != txt[i]) {
      if (j != 0)
        j = lps[j - 1];
      else
        i = i + 1;
    }
  }
  free(lps);
  return -1;
}
void computeLPSArray(string pat, long long M, long long *lps) {
  long long len = 0;
  long long i;
  lps[0] = 0;
  i = 1;
  while (i < M) {
    if (pat[i] == pat[len]) {
      len++;
      lps[i] = len;
      i++;
    } else {
      if (len != 0) {
        len = lps[len - 1];
      } else {
        lps[i] = 0;
        i++;
      }
    }
  }
}
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;
}
