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.
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
 
import static java.lang.Math.*;

public class Main implements Runnable {
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }
        
        public int read() {
            if (numChars==-1) 
                throw new InputMismatchException();
            
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                
                if(numChars <= 0)               
                    return -1;
            }
            return buf[curChar++];
        }
     
        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();
            
            while(isSpaceChar(c)) 
                c = read();
            
            int sgn = 1;
            
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            
            int res = 0;
            do {
                if(c<'0'||c>'9') 
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c)); 
            
            return res * sgn;
        }
        
        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }
        
        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
        
        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } 
            while (!isSpaceChar(c));
            
            return res.toString();
        }
     
        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
     
        public String next() {
            return readString();
        }
        
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new Main(),"Main",1<<26).start();
    }
    boolean check(char a, char b) {
        return (a == '0' && b == '9') || (a == '9' && b == '0');
    }
    void solve(int i, int step) {
        if(moves.size() == (int)1e5)
            return;

        if(step == 1 && s[i + 1] == '9') {
            solve(i + 1, -1);
        }
        else if(step == -1 && s[i + 1] == '0') {
            solve(i + 1, 1);
        }

        if(moves.size() == (int)1e5)
            return;

        moves.add(new Move(i, step));
        s[i] += step;
        s[i + 1] += step;
    }
    char[] s;
    ArrayList<Move> moves = new ArrayList<>();
    public void run() {
        InputReader sc = new InputReader(System.in);
        PrintWriter w = new PrintWriter(System.out);

        int n = sc.nextInt();

        s = sc.next().toCharArray();
        char[] t = sc.next().toCharArray();

        char[] tempS = new char[n];
        char[] tempT = new char[n];
        for(int i = 0; i < n; ++i) {
            tempS[i] = s[i];
            tempT[i] = t[i];
        }


        int ind = -1;
        long ans = 0;
        int flag = 0;
        main : for(int i = 0; i < n - 1; ++i) {
            while(s[i] != t[i]) {
                if(s[i] < t[i]) {
                    if(s[i + 1] == '9') {
                        if(ind <= i)
                            ind = i + 1;

                        while(ind + 1 < n && check(s[ind + 1], s[ind]))
                            ind++;
                        if(ind == n - 1) {
                            flag = 1;
                            break;
                        }
                        if(s[ind] == '0')
                            s[ind + 1]++;
                        else
                            s[ind + 1]--;
                        s[i + 1]--;
                        ans += (long)(ind - i);
                    }
                    ans++;
                    s[i]++;
                    s[i + 1]++;
                }
                else {
                    if(s[i + 1] == '0') {
                        if(ind <= i)
                            ind = i + 1;

                        while(ind + 1 < n && check(s[ind + 1], s[ind]))
                            ind++;
                        if(ind == n - 1) {
                            flag = 1;
                            break;
                        }
                        if(s[ind] == '0')
                            s[ind + 1]++;
                        else
                            s[ind + 1]--;
                        s[i + 1]++;
                        ans += (long)(ind - i);
                    }
                    ans++;
                    s[i]--;
                    s[i + 1]--;
                }
            }
        }

        if(flag == 1 || s[n - 1] != t[n - 1]) {
            w.print("-1");
            w.close();
            return;
        }

        s = tempS;
        t = tempT;

        w.println(ans);
        for(int i = 0; i < n - 1; ++i) {
            while(s[i] < t[i] && moves.size() != (int)1e5)
                solve(i, 1);
            while(s[i] > t[i] && moves.size() != (int)1e5)
                solve(i, -1);
        }
        for(Move m : moves)
            w.println(m);

        w.close();
    }
}
class Move {
    int ind, step;
    Move(int a, int b) {
        ind = a;
        step = b;
    }
    public String toString() {
        return (ind + 1) + " " + step;
    }
}