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;
template <class T, class U>
void Min(T &a, U b) {
  if (a > b) a = b;
}
template <class T, class U>
void Max(T &a, U b) {
  if (a < b) a = b;
}
int n = 0, fail[1000010], len[1000010], diff[1000010], sz, pr[1000010],
    dp[1000010], p[1000010], last;
char a[1000010], b[1000010];
int s[1000010], to[1000010][26];
void init() {
  s[n++] = -1;
  len[1] = -1;
  fail[0] = 1;
  sz = 2;
}
int get_link(int first) {
  while (s[n - len[first] - 2] != s[n - 1]) first = fail[first];
  return first;
}
void add(int c) {
  n++;
  last = get_link(last);
  if (!to[last][c]) {
    len[sz] = len[last] + 2;
    fail[sz] = to[get_link(fail[last])][c];
    diff[sz] = len[sz] - len[fail[sz]];
    pr[sz] = diff[sz] == diff[fail[sz]] ? pr[fail[sz]] : fail[sz];
    to[last][c] = sz++;
  }
  last = to[last][c];
}
pair<int, int> memo[1000010];
pair<int, int> go(int first) {
  int k = n - 1 - len[pr[first]] - diff[first];
  memo[first] = {dp[k], k};
  if (diff[first] == diff[fail[first]]) {
    Min(memo[first], memo[fail[first]]);
  }
  return memo[first];
}
int main() {
  int m = 1, j, k, K, T;
  scanf("%s%s", a, b);
  for (int i = 0; a[i]; i++) {
    s[m++] = a[i] - 'a';
    s[m++] = b[i] - 'a';
  }
  init();
  for (int i = 1; i < m; i++) {
    add(s[i]);
    dp[i] = 1000000007;
    if (i % 2 == 0 && s[i] == s[i - 1]) dp[i] = dp[i - 2], p[i] = i - 2;
    for (int first = last; len[first] > 0; first = pr[first]) {
      pair<int, int> e = go(first);
      if (i % 2 == 0 && e.first + 1 < dp[i]) {
        dp[i] = e.first + 1;
        p[i] = e.second;
      }
    }
  }
  if (dp[m - 1] >= 1000000007) {
    puts("-1");
    return 0;
  }
  printf("%d\n", dp[m - 1]);
  int first = m - 1;
  while (first > 0) {
    int second = p[first];
    if (first - second > 2) {
      printf("%d %d\n", second / 2 + 1, first / 2);
    }
    first = second;
  }
  return 0;
}