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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void FastIO() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
}
namespace io {
const int SIZE = (1 << 20) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
template <typename A>
inline bool read(A &x) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c<'0' | c> '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (x = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = x * 10 + (c & 15);
  x *= f;
  return 1;
}
inline bool read(char &x) {
  while ((x = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                           (iS == iT ? EOF : *iS++))
                        : *iS++)) == ' ' ||
         x == '\n' || x == '\r')
    ;
  return x != EOF;
}
inline bool read(string &x) {
  while ((c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                           (iS == iT ? EOF : *iS++))
                        : *iS++)) == '\n' ||
         c == ' ' || c == '\r')
    ;
  if (c == EOF) return 0;
  x.clear();
  while (!(c == '\n' || c == ' ' || c == '\r' || c == EOF))
    x.push_back(c),
        c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                         (iS == iT ? EOF : *iS++))
                      : *iS++);
  return 1;
}
template <typename A, typename... B>
inline int read(A &x, B &...y) {
  return read(x) + read(y...);
}
template <typename A>
inline bool write(A x) {
  if (!x) putc('0');
  if (x < 0) putc('-'), x = -x;
  while (x) qu[++qr] = x % 10 + '0', x /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char x) {
  putc(x);
  return 0;
}
inline bool write(const char *x) {
  while (*x) {
    putc(*x);
    ++x;
  }
  return 0;
}
inline bool write(char *x) {
  while (*x) {
    putc(*x);
    ++x;
  }
  return 0;
}
inline bool write(string s) { return write(s.c_str()); }
template <typename A, typename... B>
inline bool write(A x, B... y) {
  return write(x) || write(y...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io::putc;
using io::read;
using io::write;
const int MOD = 1e9 + 7, MOD2 = 1e9 + 9;
int dx[] = {-2, -2, -1, -1, 1, 1, 2, 2};
int dy[] = {1, -1, 2, -2, 2, -2, 1, -1};
int n, m;
bool check(int i, int j) { return 1 <= i && i <= n && 1 <= j && j <= m; }
int d[2][60][60] = {};
std::pair<int, int> s[2];
std::pair<int, int> par[2][60][60] = {};
bool vis[2][60][60] = {};
void bfs(int id, int si, int sj) {
  queue<std::pair<int, int> > q;
  q.push({si, sj});
  vis[id][si][sj] = 1;
  while (!q.empty()) {
    auto [ui, uj] = q.front();
    q.pop();
    for (int k = (0); k < (8); k += (1)) {
      int vi = ui + dx[k], vj = uj + dy[k];
      if (!check(vi, vj) || vis[id][vi][vj]) continue;
      d[id][vi][vj] = d[id][ui][uj] + 1;
      par[id][vi][vj] = make_pair(ui, uj);
      vis[id][vi][vj] = 1;
      q.push(make_pair(vi, vj));
    }
  }
}
int main(int argc, char *argv[]) {
  FastIO();
  cin >> n >> m;
  for (int i = (0); i < (2); i += (1)) cin >> s[i].first >> s[i].second;
  bfs(0, n / 2, m / 2);
  bfs(1, n / 2 + 1, m / 2);
  if (d[0][s[0].first][s[0].second] < d[0][s[1].first][s[1].second] &&
      d[0][s[0].first][s[0].second] <= d[1][s[1].first][s[1].second]) {
    cout << "WHITE" << '\n';
    cout.flush();
    while (1) {
      auto [ui, uj] = par[0][s[0].first][s[0].second];
      s[0].first = ui;
      s[0].second = uj;
      if (ui == n / 2 && uj == m / 2) {
        cout << ui << ' ' << uj << '\n';
        cout.flush();
        return 0;
      } else {
        cout << ui << ' ' << uj << '\n';
        cout.flush();
        cin >> s[1].first >> s[1].second;
        if (s[1].first == -1) assert(false);
      }
    }
  } else if (d[1][s[1].first][s[1].second] + 1 <
                 d[1][s[0].first][s[0].second] &&
             d[1][s[1].first][s[1].second] <= d[0][s[0].first][s[0].second]) {
    cout << "BLACK" << '\n';
    cout.flush();
    cin >> s[0].first >> s[0].second;
    if (s[0].first == -1) assert(false);
    while (1) {
      auto [ui, uj] = par[1][s[1].first][s[1].second];
      s[1].first = ui;
      s[1].second = uj;
      if (ui == n / 2 + 1 && uj == m / 2) {
        cout << ui << ' ' << uj << '\n';
        cout.flush();
        return 0;
      } else {
        cout << ui << ' ' << uj << '\n';
        cout.flush();
        cin >> s[0].first >> s[0].second;
        if (s[0].first == -1) assert(false);
      }
    }
  } else if (((s[0].first + s[0].second) & 1) ==
             ((s[1].first + s[1].second) & 1)) {
    cout << "BLACK" << '\n';
    cout.flush();
    cin >> s[0].first >> s[0].second;
    if (s[0].first == -1) assert(false);
    int dx = abs(s[1].first - (n / 2 + 1)), dy = abs(s[1].second - (m / 2));
    if ((dx == 1 && dy == 2) || (dx == 2 && dy == 1)) {
      cout << n / 2 + 1 << ' ' << m / 2 << '\n';
      cout.flush();
      return 0;
    }
    bool ok = 0;
    int cnt = 0;
    while (1) {
      if (s[1].first == n / 2 && s[1].second == m / 2 && cnt == 0) {
        ok = 1;
        break;
      } else
        ++cnt;
      auto [ui, uj] = par[0][s[1].first][s[1].second];
      s[1].first = ui;
      s[1].second = uj;
      cout << ui << ' ' << uj << '\n';
      cout.flush();
      if (ui == s[0].first && uj == s[0].second) return 0;
      if (ui == n / 2 && uj == m / 2) break;
      cin >> s[0].first >> s[0].second;
      if (s[0].first == -1) assert(false);
    }
    if (ok == 0) cin >> s[0].first >> s[0].second;
    dx = abs(s[0].first - s[1].first);
    dy = abs(s[0].second - s[1].second);
    if ((dx == 1 && dy == 2) || (dx == 2 && dy == 1)) {
      cout << s[0].first << ' ' << s[0].second << '\n';
      cout.flush();
      return 0;
    }
    cout << (n / 2) + 2 << ' ' << (m / 2) + 1 << '\n';
    cout.flush();
    if ((n / 2) + 2 == s[0].first && (m / 2) + 1 == s[0].second) return 0;
    cin >> s[0].first >> s[0].second;
    cout << n / 2 << ' ' << (m / 2) + 2 << '\n';
    cout.flush();
    if (n / 2 == s[0].first && m / 2 + 2 == s[0].second) return 0;
    cin >> s[0].first >> s[0].second;
    cout << (n / 2 + 1) << ' ' << m / 2 << '\n';
    cout.flush();
    return 0;
  } else {
    cout << "WHITE" << '\n';
    cout.flush();
    bool ok = 0;
    int cnt = 0;
    while (1) {
      if (s[0].first == n / 2 + 1 && s[0].second == m / 2 && cnt == 0) {
        ok = 1;
        break;
      } else
        ++cnt;
      auto [ui, uj] = par[1][s[0].first][s[0].second];
      s[0].first = ui;
      s[0].second = uj;
      cout << ui << ' ' << uj << '\n';
      cout.flush();
      if (ui == s[1].first && uj == s[1].second) return 0;
      if (ui == n / 2 + 1 && uj == m / 2) break;
      cin >> s[1].first >> s[1].second;
      if (s[1].first == -1) assert(false);
    }
    if (ok == 0) cin >> s[1].first >> s[1].second;
    int dx = abs(s[0].first - s[1].first), dy = abs(s[0].second - s[1].second);
    if ((dx == 1 && dy == 2) || (dx == 2 && dy == 1)) {
      cout << s[1].first << ' ' << s[1].second << '\n';
      cout.flush();
      return 0;
    }
    cout << (n / 2) << ' ' << (m / 2) + 2 << '\n';
    cout.flush();
    if ((n / 2) == s[1].first && (m / 2) + 2 == s[1].second) return 0;
    cin >> s[1].first >> s[1].second;
    cout << n / 2 + 2 << ' ' << (m / 2) + 1 << '\n';
    cout.flush();
    if (n / 2 + 2 == s[1].first && m / 2 + 1 == s[1].second) return 0;
    cin >> s[1].first >> s[1].second;
    cout << (n / 2) << ' ' << m / 2 << '\n';
    cout.flush();
    return 0;
  }
  return 0;
}