One player came to a casino and found a slot machine where everything depends only on how he plays. The rules follow.

A positive integer a is initially on the screen. The player can put a coin into the machine and then add 1 to or subtract 1 from any two adjacent digits. All digits must remain from 0 to 9 after this operation, and the leading digit must not equal zero. In other words, it is forbidden to add 1 to 9, to subtract 1 from 0 and to subtract 1 from the leading 1. Once the number on the screen becomes equal to b, the player wins the jackpot. a and b have the same number of digits.

Help the player to determine the minimal number of coins he needs to spend in order to win the jackpot and tell how to play.

Input

The first line contains a single integer n (2 ≤ n ≤ 10^5) standing for the length of numbers a and b.

The next two lines contain numbers a and b, each one on a separate line (10^{n-1} ≤ a, b < 10^n).

Output

If it is impossible to win the jackpot, print a single integer -1.

Otherwise, the first line must contain the minimal possible number c of coins the player has to spend.

min(c, 10^5) lines should follow, i-th of them containing two integers d_i and s_i (1≤ d_i≤ n - 1, s_i = ± 1) denoting that on the i-th step the player should add s_i to the d_i-th and (d_i + 1)-st digits from the left (e. g. d_i = 1 means that two leading digits change while d_i = n - 1 means that there are two trailing digits which change).

Please notice that the answer may be very big and in case c > 10^5 you should print only the first 10^5 moves. Your answer is considered correct if it is possible to finish your printed moves to win the jackpot in the minimal possible number of coins. In particular, if there are multiple ways to do this, you can output any of them.

Examples

Input


3
223
322


Output


2
1 1
2 -1


Input


2
20
42


Output


2
1 1
1 1


Input


2
35
44


Output


-1

Note

In the first example, we can make a +1 operation on the two first digits, transforming number 223 into 333, and then make a -1 operation on the last two digits, transforming 333 into 322.

It's also possible to do these operations in reverse order, which makes another correct answer.

In the last example, one can show that it's impossible to transform 35 into 44.
#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ans = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) ans = (ans << 3) + (ans << 1) + (ch ^ 48), ch = getchar();
  return ans;
}
const int N = 1e5 + 5;
char s[N];
int n, a[N], b[N], det[N];
long long ans = 0;
int main() {
  n = read();
  scanf("%s", s + 1);
  for (register int i = 1; i <= n; ++i) a[i] = s[i] ^ 48;
  scanf("%s", s + 1);
  for (register int i = 1; i <= n; ++i) b[i] = s[i] ^ 48;
  det[1] = b[1] - a[1];
  for (register int i = 2; i <= n; ++i) det[i] = b[i] - det[i - 1] - a[i];
  if (det[n]) return puts("-1"), 0;
  for (register int i = 1; i < n; ++i) ans += det[i] > 0 ? det[i] : -det[i];
  cout << ans << '\n';
  ans = min(ans, 100000ll);
  int p = 1, cur = 1, tmp;
  while (ans--) {
    while (!det[p]) ++p, ++cur;
    while ((det[cur] > 0 && a[cur + 1] == 9) ||
           (det[cur] < 0 && a[cur + 1] == 0))
      ++cur;
    tmp = det[cur] > 0 ? 1 : -1;
    cout << cur << ' ' << tmp << '\n';
    a[cur] += tmp, a[cur + 1] += tmp, det[cur] -= tmp;
    cur = max(cur - 1, p);
  }
  return 0;
}
