Problem: Hurricane came to Berland and to suburbs Stringsvill. You are going to it to check if it's all right with you favorite string. Hurrinace broke it a bit by reversing some of its non-intersecting substrings. You have a photo of this string before hurricane and you want to restore it to original state using reversing minimum possible number of its substrings and find out which substrings you should reverse.

You are given a string s — original state of your string and string t — state of the string after hurricane. You should select k non-intersecting substrings of t in such a way that after reverse of these substrings string will be equal s and k is minimum possible.

Input

First line of input contains string s and second line contains string t. Both strings have same length and consist of lowercase English letters. 1 ≤ |s| = |t| ≤ 5·105

Output

In first line print k — minimum number of substrings you should reverse. Next output k lines. Each line should contain two integers li, ri meaning that you should reverse substring from symbol number li to symbol ri (strings are 1-indexed). These substrings shouldn't intersect. If there are multiple answers print any. If it's impossible to restore string output -1.

Example

Input

abcxxxdef
cbaxxxfed


Output

2
7 9
1 3

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct Node {
  int w, x;
  Node() {}
  Node(int _w, int _x) {
    w = _w;
    x = _x;
  }
};
Node qmin(Node a, Node b) {
  if (a.w < b.w)
    return a;
  else
    return b;
}
const int N = 1e6 + 50, inf = 1e7;
int n, m, tot, now, id;
int a[N];
Node f[N];
char sa[N], sb[N];
int len[N], fail[N], slk[N], nxt[N][26];
Node g[N];
void ins(int c) {
  int x;
  while (a[id] != a[id - len[now] - 1]) now = fail[now];
  if (nxt[now][c])
    now = nxt[now][c];
  else {
    x = now;
    now = nxt[x][c] = ++tot;
    len[now] = len[x] + 2;
    x = fail[x];
    while (x > 0 && (nxt[x][c] == 0 || a[id] != a[id - len[x] - 1]))
      x = fail[x];
    if (x)
      fail[now] = nxt[x][c];
    else
      fail[now] = 2;
    if (fail[now] != 2 && len[fail[now]] * 2 == len[now] + len[fail[fail[now]]])
      slk[now] = slk[fail[now]];
    else
      slk[now] = now;
  }
}
void query() {
  int x, nl;
  x = now;
  while (x > 2) {
    if (slk[x] != x)
      g[x] = g[fail[x]];
    else
      g[x] = Node(inf, 0);
    nl = len[slk[x]];
    g[x] = qmin(g[x], Node(f[id - nl].w, id - nl));
    if ((id & 1) == 0) f[id] = qmin(f[id], Node(g[x].w + 1, g[x].x));
    x = fail[slk[x]];
  }
}
int main() {
  int i, x;
  scanf("%s", sa + 1);
  scanf("%s", sb + 1);
  n = strlen(sa + 1);
  m = 0;
  for (i = 1; i <= n; i++) {
    a[++m] = sa[i] - 'a';
    a[++m] = sb[i] - 'a';
  }
  tot = 2;
  len[1] = -1;
  fail[2] = 1;
  now = 1;
  a[0] = -1;
  for (id = 1; id <= m; id++) {
    f[id] = Node(inf, 0);
    ins(a[id]);
    query();
    if ((id & 1) == 0 && a[id - 1] == a[id])
      f[id] = qmin(f[id], Node(f[id - 2].w, id - 2));
  }
  if (f[m].w == inf) {
    puts("-1");
    return 0;
  }
  printf("%d\n", f[m].w);
  x = m;
  while (x != 0) {
    if (f[x].x != x - 2) printf("%d %d\n", (f[x].x >> 1) + 1, x >> 1);
    x = f[x].x;
  }
  return 0;
}