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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;


import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.TreeSet;


public final class CF_543_D1_B {

	static boolean verb=true;
	static void log(Object X){if (verb) System.err.println(X);}
	static void log(Object[] X){if (verb) {for (Object U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");System.err.println("");}}
	static void logWln(Object X){if (verb) System.err.print(X);}
	static void info(Object o){	System.out.println(o);}
	static void output(Object o){outputWln(""+o+"\n");	}
	static void outputWln(Object o){try {out.write(""+ o);} catch (Exception e) {}}



	// Global vars
	static BufferedWriter out;
	static InputReader reader;

	static int MX=500001;

	static class Order{
		int idx;
		int value;
		ArrayList<Order> before;
		int it;

		public Order(int idx, int value) {
			this.idx = idx;
			this.value = value;
			it=0;
		}

		public void add(Order Y){
			if (before==null)
				before=new ArrayList<Order>();
			before.add(Y);
		}

		public String toString(){
			return idx+" "+value;
		}

	}

	static void recPrint(Order X){
		//log(X);
		if (X.before==null){
			output(X.idx+" "+X.value);
		} else {
			for (Order Y:X.before){
				recPrint(Y);
			}
			output(X.idx+" "+X.value);
		}
	}

	static int writ;
	static int MAX=100000;

	static Order[] stack;

	static void print(Order X){
		output(X);
		writ++;
	}

	static void recPrintStack(Order X){
		//log(X);

		if (X.before==null){
			print(X);

		} else {
			int st=0;
			stack[st++]=X;
			int cnt=0;
			while (st>0 && writ<MAX){
				cnt++;
				Order U=stack[st-1];
				if (U.before==null ||(U.before!=null && U.it==U.before.size())){
					print(U);
					st--;
				} else {
					Order V=U.before.get(U.it++);
					stack[st++]=V;
				}
			}

			//log("cnt:"+cnt);
		}
	}

	static boolean ok(int x,int idx){
			return x>=0 && x<=9;
	}

	static int sgn(int x){
		if (x<0)
			return -1;
		if (x>0)
			return 1;
		return 0;
	}
	
	static void show(int[] a){
		int L=a.length;
		for (int i=0;i<L;i++){
			logWln(a[L-1-i]+" ");
		}
		log("");
	}
	
	static void solveStack(String A,String B,int n){
		
		int tot=0;
		int[] mem=new int[n];
		ArrayList<Order> list=new ArrayList<Order>();
		ArrayList<Order> res=new ArrayList<Order>();

		int[] a=new int[n];
		int[] b=new int[n];
		for (int i=0;i<n;i++){
			a[i]=A.charAt(n-1-i)-'0';
			b[i]=B.charAt(n-1-i)-'0';

		}

		int gen=0;
		int[] stick=new int[n];
		boolean[] visited=new boolean[n];

		for (int i=0;i<n && gen<MAX;i++){
			if (i==n-1 && a[i]!=b[i]){
				log("error");
				return;
			}
			while (a[i]!=b[i] && gen<MAX){
				//log("-------------------------");
				
				int v=sgn(b[i]-a[i]);
				Order Y=new Order(n-1-i,v);
				int cur=v;
				int st=0;
				visited[st]=false;
				stack[st++]=Y;
				while (st>0 && gen<MAX){
					Order U=stack[st-1];
					if (visited[st-1]){
						int j=n-1-U.idx;
						a[j]+=U.value;
						a[j+1]+=U.value;
						print(U);
						gen++;
						st--;
					} else {
						visited[st-1]=true;
						int j=n-1-U.idx;
						if (!ok(a[j+1]+U.value,n-1-(j+1))){
							Order V=new Order(n-1-(j+1),-U.value);
							visited[st]=false;
							stack[st++]=V;
						}
					}
				}
			}
		}

	}

	static void solve(String A,String B,int n){
		long cur=0;
		int tot=0;
		int[] mem=new int[n];
		ArrayList<Order> list=new ArrayList<Order>();
		ArrayList<Order> res=new ArrayList<Order>();
		int gen=0;
		for (int i=0;i<n;i++){
			int x=A.charAt(n-1-i)-'0';
			int y=B.charAt(n-1-i)-'0';
			ArrayList<Order> nlist=new ArrayList<Order>();
			int ncur=0;
			;
			// process previous orders
			for (Order X:list){

				x+=X.value;
				// do we need to compensate ??
				if (x<0){

					Order Y=new Order(n-1-i,1);
					//log("compensate with "+Y);
					X.add(Y);
					nlist.add(Y);
					gen++;
					x+=1;
					ncur++;
					tot++;
				}
				if (x>9){

					Order Y=new Order(n-1-i,-1);
					//log("compensate with "+Y);
					X.add(Y);
					nlist.add(Y);
					gen++;
					x-=1;
					ncur--;
					tot++;
				}
			}

			// now delta with target
			//log("x:"+x+" y:"+y);
			if (gen<MAX){
				while (x<y){
					Order Y=new Order(n-1-i,1);

					gen++;
					nlist.add(Y);
					res.add(Y);

					//log("normal // adding "+Y);
					x++;
					ncur++;
					tot++;
				}

				while (x>y){
					Order Y=new Order(n-1-i,-1);
					gen++;
					nlist.add(Y);
					res.add(Y);
					//log("normal // adding "+Y);
					x--;
					ncur--;
					tot++;
				}

			}
			list=nlist;
			cur=ncur;



		}

		if (cur!=0){
			log("error:"+cur);

		} else {
			output(tot);
			writ=0;
			stack=new Order[MAX];
			for (Order X:res){
				recPrintStack(X);
				//recPrint(X);
				if (writ==MAX)
					break;
			}
			log("writ:"+writ);
		}
	}

	static long checkFast(String A,String B,int n){
		long cur=0;
		long tot=0;

		for (int i=0;i<n;i++){
			int x=A.charAt(n-1-i)-'0';
			int y=B.charAt(n-1-i)-'0';
			x+=cur;
			tot+=Math.abs(x-y);
			cur=y-x;
		}
		if (cur!=0)
			return -1;
		return tot;
	}

	static void process() throws Exception {



		out = new BufferedWriter(new OutputStreamWriter(System.out));
		reader=new InputReader(System.in);


		int n=reader.readInt();
		String A=reader.readString();
		String B=reader.readString();


		stack=new Order[MAX];

		long tot=checkFast(A,B,n);
		output(tot);
		if (tot>=0){
			solveStack(A,B,n);
		}





		try {
			out.close();
		}
		catch (Exception e){}


	}


	public static void main(String[] args) throws Exception {
		process();

	}

	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}


		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res=new StringBuilder();
			do {
				res.append((char)c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg=false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d=(char)c;
			//log("d:"+d);
			if (d=='-') {
				neg=true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			//log("res:"+res);
			if (neg)
				return -res;
			return res;

		}




		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}



}



/*

80
90909090901111111111909090909011111111119090909090111111111190909090901111111111
11111111119090909090111111111190909090901111111111909090909011111111119090909090


3
108
207

*/