Problem: You are given two integers b and w. You have a chessboard of size 10^9 × 10^9 with the top left cell at (1; 1), the cell (1; 1) is painted white.

Your task is to find a connected component on this chessboard that contains exactly b black cells and exactly w white cells. Two cells are called connected if they share a side (i.e. for the cell (x, y) there are at most four connected cells: (x - 1, y), (x + 1, y), (x, y - 1), (x, y + 1)). A set of cells is called a connected component if for every pair of cells C_1 and C_2 from this set, there exists a sequence of cells c_1, c_2, ..., c_k such that c_1 = C_1, c_k = C_2, all c_i from 1 to k are belong to this set of cells and for every i ∈ [1, k - 1], cells c_i and c_{i + 1} are connected.

Obviously, it can be impossible to find such component. In this case print "NO". Otherwise, print "YES" and any suitable connected component.

You have to answer q independent queries.

Input

The first line of the input contains one integer q (1 ≤ q ≤ 10^5) — the number of queries. Then q queries follow.

The only line of the query contains two integers b and w (1 ≤ b, w ≤ 10^5) — the number of black cells required and the number of white cells required.

It is guaranteed that the sum of numbers of cells does not exceed 2 ⋅ 10^5 (∑ w + ∑ b ≤ 2 ⋅ 10^5).

Output

For each query, print the answer to it.

If it is impossible to find the required component, print "NO" on the first line.

Otherwise, print "YES" on the first line. In the next b + w lines print coordinates of cells of your component in any order. There should be exactly b black cells and w white cells in your answer. The printed component should be connected.

If there are several answers, you can print any. All coordinates in the answer should be in the range [1; 10^9].

Example

Input


3
1 1
1 4
2 5


Output


YES
2 2
1 2
YES
2 3
1 3
3 3
2 2
2 4
YES
2 3
2 4
2 5
1 3
1 5
3 3
3 5

Solution (in JAVA):

Solution:
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;

public class E575 {
	
	public static void get(int B, int W, StringBuilder sb) {
		int startR = 2;
		int startC = 2;
		if(B < W) {
			startC = 3;
		}
		
		int r = startR;
		int c = startC;
		
		int min = Math.min(W, B);
		int max = Math.max(W, B);
		
		for(int i = 0; i < min; i++) {
			sb.append(r + " " + c + "\n");
			r += 2;
		}
		
		r = startR;
		for(int i = 0; i < min-1 && max > 0; i++) {
			sb.append((r+1) + " " + c + "\n");
			r += 2;
			max--;
		}
		
		int temp = 0;
		for(r = startR, c = startC-1; temp < min && max > 0; max--, r += 2) {
			//System.out.println("1.3");
			sb.append(r + " " + c + "\n");
			temp++;
		}
		
		temp = 0;
		for(r = startR, c = startC+1; temp < min && max > 0; max--, r += 2) {
			sb.append(r + " " + c + "\n");
			//System.out.println("1.5");
			temp++;
		}
		
		if(max > 0) {
			//System.out.println("1.7");
			max--;
			sb.append("1 " + startC + "\n");
		}
		
		if(max > 0) {
			max--;
			sb.append((2*min+1) + " " + startC + "\n");
		}
		
	}

	public static void main(String[] args) {
		FastScanner in = new FastScanner(System.in);
		int Q = in.nextInt();
		StringBuilder sb = new StringBuilder();
		while(Q --> 0) {
			int B = in.nextInt();
			int W = in.nextInt();
			
			if(W > 3*B + 1 || B > 3*W + 1) {
				sb.append("NO\n");
				continue;
			}
			
			sb.append("YES\n");
			get(B, W, sb);
		}
		
		System.out.print(sb);
	}
	
	/**
	 * Source: Matt Fontaine
	 */
	static class FastScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int chars;

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

		int read() {
			if (chars == -1)
				throw new InputMismatchException();
			if (curChar >= chars) {
				curChar = 0;
				try {
					chars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (chars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

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

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

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String next() {
			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 String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}
	}

}
/*
3
1 1
1 4
2 5
outputCopy
YES
2 2
1 2
YES
2 3
1 3
3 3
2 2
2 4
YES
2 3
2 4
2 5
1 3
1 5
3 3
3 5
*/