#include <bits/stdc++.h>
using namespace std;
struct Node {
  Node *first, *next;
  int at;
  char ch;
  Node(int _at, char _ch, Node* last) {
    first = NULL;
    next = last;
    at = _at;
    ch = _ch;
  }
  Node* getChild(char c) {
    Node* cur = first;
    while (cur) {
      if (cur->ch == c) return cur;
      cur = cur->next;
    }
    return NULL;
  }
};
struct Trie {
  Node* root;
  Trie() { root = new Node(0, 0, NULL); }
  void insert(char* s, int len, int at) {
    Node* cur = root;
    Node* nxt;
    for (int i = 0; i < len; ++i) {
      nxt = cur->getChild(s[i]);
      if (nxt == NULL) {
        nxt = new Node(at, s[i], cur->first);
        cur->first = nxt;
      }
      cur = nxt;
      cur->at = at;
    }
  }
};
Trie a, b;
char s[2101], t[2101];
int len, dp[2100], lenA;
pair<int, int> best[2100];
int calc(int i) {
  if (i == len) return 0;
  int& ret = dp[i];
  if (ret != -1) return ret;
  ret = 1e9;
  Node* cur = a.root;
  for (int j = i; j < len; ++j) {
    cur = cur->getChild(t[j]);
    if (cur == NULL) break;
    int z = 1 + calc(j + 1);
    if (z < ret) {
      ret = z;
      best[i] = make_pair(cur->at, cur->at + j - i);
    }
  }
  cur = b.root;
  for (int j = i; j < len; ++j) {
    cur = cur->getChild(t[j]);
    if (cur == NULL) break;
    int z = 1 + calc(j + 1);
    if (z < ret) {
      ret = z;
      int x = cur->at;
      int y = cur->at + j - i;
      x = lenA - x - 1;
      y = lenA - y - 1;
      best[i] = make_pair(x, y);
    }
  }
  return ret;
}
int main() {
  scanf("%s%s", s, t);
  lenA = len = strlen(s);
  for (int i = 0; i < len; ++i) a.insert(s + i, len - i, i);
  reverse(s, s + len);
  for (int i = 0; i < len; ++i) b.insert(s + i, len - i, i);
  reverse(s, s + len);
  memset(dp, -1, sizeof(dp));
  len = strlen(t);
  if (calc(0) > 1e8) {
    puts("-1");
    return 0;
  }
  int cur = 0;
  printf("%d\n", calc(0));
  while (cur != len) {
    printf("%d %d\n", best[cur].first + 1, best[cur].second + 1);
    cur += abs(best[cur].first - best[cur].second) + 1;
  }
  return 0;
}
