Problem: This problem only differs from the next problem in constraints.

This is an interactive problem.

Alice and Bob are playing a game on the chessboard of size n × m where n and m are even. The rows are numbered from 1 to n and the columns are numbered from 1 to m. There are two knights on the chessboard. A white one initially is on the position (x_1, y_1), while the black one is on the position (x_2, y_2). Alice will choose one of the knights to play with, and Bob will use the other one.

The Alice and Bob will play in turns and whoever controls the white knight starts the game. During a turn, the player must move their knight adhering the chess rules. That is, if the knight is currently on the position (x, y), it can be moved to any of those positions (as long as they are inside the chessboard):

(x+1, y+2), (x+1, y-2), (x-1, y+2), (x-1, y-2),

(x+2, y+1), (x+2, y-1), (x-2, y+1), (x-2, y-1). 

We all know that knights are strongest in the middle of the board. Both knight have a single position they want to reach: 

  * the owner of the white knight wins if it captures the black knight or if the white knight is at (n/2, m/2) and this position is not under attack of the black knight at this moment; 
  * The owner of the black knight wins if it captures the white knight or if the black knight is at (n/2+1, m/2) and this position is not under attack of the white knight at this moment. 



Formally, the player who captures the other knight wins. The player who is at its target square ((n/2, m/2) for white, (n/2+1, m/2) for black) and this position is not under opponent's attack, also wins.

A position is under attack of a knight if it can move into this position. Capturing a knight means that a player moves their knight to the cell where the opponent's knight is.

If Alice made 350 moves and nobody won, the game is a draw.

Alice is unsure in her chess skills, so she asks you for a help. Choose a knight and win the game for her. It can be shown, that Alice always has a winning strategy.

Interaction

The interaction starts with two integers n and m (6 ≤ n,m ≤ 40, n and m are even) — the dimensions of the chessboard.

The second line contains four integers x_1, y_1, x_2, y_2 (1 ≤ x_1, x_2 ≤ n, 1 ≤ y_1, y_2 ≤ m) — the positions of the white and the black knight. It is guaranteed that the two knights have different starting positions. It is also guaranteed that none of the knights are in their own target square in the beginning of the game (however, they can be on the opponent's target position).

Your program should reply with either "WHITE" or "BLACK", depending on the knight you want to play with. In case you select the white knight, you start the game.

During every your turn, you need to print two integers: x and y, the position to move the knight. If you won the game by this turn, you must terminate your program immediately.

After every turn of the opponent, you will receive two integers: x and y, the position where Bob moved his knight.

If your last move was illegal or you lost the game after jury's turn, or you made 350 moves, and haven't won, you will receive "-1 -1". In such cases, you should terminate your program and then you will get a Wrong Answer verdict.

After printing anything, do not forget to output the end of line and flush the output. Otherwise, you might get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.



Hacks are disabled for this problem.

Jury's program is adaptive: the moves of jury may depend on the moves made by your program.

Examples

Input


8 8
2 3 1 8


Output


WHITE
4 4


Input


6 6
4 4 2 2
6 3

Output


BLACK
4 3

Note

In the first example, the white knight can reach it's target square in one move.

In the second example black knight wins, no matter what white knight moves.

Solution (in JAVA):

Solution:
//package round577;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Queue;

public class E1 {
	InputStream is;
	PrintWriter out;
	String INPUT = "";
	
	static int[] DRK = {-2,-2,-1,-1,1,1,2,2};
	static int[] DCK = {-1,1,-2,2,-2,2,-1,1};
	
	void solve()
	{
		int n = ni(), m = ni();
		int r1 = ni()-1, c1 = ni()-1;
		int r2 = ni()-1, c2 = ni()-1;
		
		int[][][][][] dp = new int[2][n][m][n][m];
		int[][][][][][] prev = new int[2][n][m][n][m][2];
		Queue<int[]> q = new ArrayDeque<>();
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				if(Math.abs(n/2-1-i) + Math.abs(m/2-1-j) == 3 && 
						Math.abs(n/2-1-i) != 3 && Math.abs(m/2-1-j) != 3){
				}else{
					q.add(new int[]{1, n/2-1, m/2-1, i, j});
					dp[1][n/2-1][m/2-1][i][j] = 1;
					prev[1][n/2-1][m/2-1][i][j][0] = -1;
				}
				
				if(Math.abs(n/2-i) + Math.abs(m/2-1-j) == 3 && 
						Math.abs(n/2-i) != 3 && Math.abs(m/2-1-j) != 3){
				}else{
					q.add(new int[]{0, i, j, n/2, m/2-1});
					dp[0][i][j][n/2][m/2-1] = -1;
					prev[0][i][j][n/2][m/2-1][0] = -1;
				}
				q.add(new int[]{1, i, j, i, j});
				q.add(new int[]{0, i, j, i, j});
				dp[1][i][j][i][j] = 1;
				dp[0][i][j][i][j] = -1;
				prev[1][i][j][i][j][0] = -1;
				prev[0][i][j][i][j][0] = -1;
			}
		}
		while(!q.isEmpty()){
			int[] cur = q.poll();
			if(cur[0] == 1){
				int val = dp[cur[0]][cur[1]][cur[2]][cur[3]][cur[4]];
				inner:
				for(int k = 0;k < 8;k++){
					int nr = cur[1] + DRK[k];
					int nc = cur[2] + DCK[k];
					if(nr >= 0 && nr < n && nc >= 0 && nc < m){
						if(dp[0][nr][nc][cur[3]][cur[4]] == 0){
							if(val == 1){
								dp[0][nr][nc][cur[3]][cur[4]] = 1;
								prev[0][nr][nc][cur[3]][cur[4]][0] = cur[1];
								prev[0][nr][nc][cur[3]][cur[4]][1] = cur[2];
								q.add(new int[]{0, nr, nc, cur[3], cur[4]});
							}else{
								for(int u = 0;u < 8;u++){
									int nnr = nr + DRK[u];
									int nnc = nc + DCK[u];
									if(nnr >= 0 && nnr < n && nnc >= 0 && nnc < m){
										if(dp[1][nnr][nnc][cur[3]][cur[4]] != -1){
											continue inner;
										}
									}
								}
								dp[0][nr][nc][cur[3]][cur[4]] = -1;
								q.add(new int[]{0, nr, nc, cur[3], cur[4]});
							}
						}
					}
				}
			}else{
				int val = dp[cur[0]][cur[1]][cur[2]][cur[3]][cur[4]];
				inner:
				for(int k = 0;k < 8;k++){
					int nr = cur[3] + DRK[k];
					int nc = cur[4] + DCK[k];
					if(nr >= 0 && nr < n && nc >= 0 && nc < m){
						if(dp[1][cur[1]][cur[2]][nr][nc] == 0){
							if(val == -1){
								dp[1][cur[1]][cur[2]][nr][nc] = -1;
								q.add(new int[]{1, cur[1], cur[2], nr, nc});
								prev[1][cur[1]][cur[2]][nr][nc][0] = cur[3];
								prev[1][cur[1]][cur[2]][nr][nc][1] = cur[4];
							}else{
								for(int u = 0;u < 8;u++){
									int nnr = nr + DRK[u];
									int nnc = nc + DCK[u];
									if(nnr >= 0 && nnr < n && nnc >= 0 && nnc < m){
										if(dp[0][cur[1]][cur[2]][nnr][nnc] != 1){
											continue inner;
										}
									}
								}
								dp[1][cur[1]][cur[2]][nr][nc] = 1;
								q.add(new int[]{1, cur[1], cur[2], nr, nc});
							}
						}
					}
				}
			}
		}
		
//		for(int i = 0;i < 2;i++){
//			for(int j = 0;j < n;j++){
//				for(int k = 0; k < m;k++){
//					for(int l = 0;l < n;l++){
//						for(int u = 0;u < m;u++){
//							if(dp[i][j][k][l][u] == 0){
//								tr(i, j, k, l, u);
//							}
//						}
//					}
//				}
//			}
//		}
//		if(true)return;
		
		if(dp[0][r1][c1][r2][c2] == 1){
			out.println("WHITE");
			out.flush();
			while(true){
				int[] pre = prev[0][r1][c1][r2][c2];
				if(pre[0] == -1)break;
				out.println((pre[0]+1) + " " + (pre[1]+1));
				out.flush();
				r1 = pre[0]; c1 = pre[1];
				if(r1 == n/2-1 && c1 == m/2-1){
					boolean ok = true;
					for(int k = 0;k < 8;k++){
						if(r2 + DRK[k] == r1 && c2 + DCK[k] == c1){
							ok = false;
						}
					}
					if(ok)break;
				}
				if(r1 == r2 && c1 == c2)break;
				r2 = ni()-1; c2 = ni()-1;
			}
		}else{
			out.println("BLACK");
			out.flush();
			while(true){
				r1= ni()-1; c1 = ni()-1;
				int[] pre = prev[1][r1][c1][r2][c2];
				if(pre[0] == -1)break;
				out.println((pre[0]+1) + " " + (pre[1]+1));
				out.flush();
				r2 = pre[0]; c2 = pre[1];
				if(r2 == n/2 && c2 == m/2-1){
					boolean ok = true;
					for(int k = 0;k < 8;k++){
						if(r2 + DRK[k] == r1 && c2 + DCK[k] == c1){
							ok = false;
						}
					}
					if(ok)break;
				}
				if(r1 == r2 && c1 == c2)break;
			}
		}
	}
	
	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);
		
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}
	
	public static void main(String[] args) throws Exception { new E1().run(); }
	
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	
	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	
	private String ns()
	{
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	private char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	private char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	
	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	
	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private long nl()
	{
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}