#include <bits/stdc++.h>   using namespace std;   int frd[2110][2110], rev[2110][2110];   vector<int> v;   int main() {     int a, b, c, d, e, i, j, p, q, mx, mx1, len;     string x, y;     cin >> x >> y;     a = x.length();     b = y.length();     x =  %  + x;     y =  *  + y;     for (i = b; i >= 1; i--) {       for (j = a; j >= 1; j--) {         if (y[i] == x[j]) {           frd[i][j] = frd[i + 1][j + 1] + 1;         }       }       for (j = 1; j <= a; j++) {         if (y[i] == x[j]) {           rev[i][j] = rev[i + 1][j - 1] + 1;         }       }     }     for (i = 1; i <= b;) {       p = -1;       q = -1;       mx = -1;       mx1 = -1;       for (j = 1; j <= a; j++) {         if (frd[i][j] > mx) {           mx = frd[i][j];           p = j;         }       }       for (j = 1; j <= a; j++) {         if (rev[i][j] > mx1) {           mx1 = rev[i][j];           q = j;         }       }       len = max(mx, mx1);       if (len == 0) {         cout <<  -1  << endl;         return 0;       }       if (len == mx) {         v.push_back(p);         v.push_back(p + len - 1);       } else {         v.push_back(q);         v.push_back(q - len + 1);       }       i = i + len;     }     cout << v.size() / 2 << endl;     e = v.size();     for (i = 0; i < e; i = i + 2) {       cout << v[i] <<     << v[i + 1] << endl;     }     return 0;   }   