2480. Old Magician

单点时限: 2.0 sec

内存限制: 256 MB

A magician does the following magic trick. He puts W white balls and B black balls in his hat and asks someone from the audience, say Bob, to remove pairs of balls in whatever order Bob would desire. After removing a pair of balls, Bob is asked to place a white ball back into the hat if they are the same color. Otherwise he is asked to place a black ball into the hat.

When Bob is left with only one ball in the hat, he asks the magician what color the last ball is. Needless to say, the magician can’t see the order by which Bob does the replacements.

The problem is that the magician, like most magicians, is old and sometimes forgets how to do the trick. Being the kind person you are, you are going to help the magician.

For each pair of numbers (W,B) you are asked to output one of the following:

  • "WHITE" - if the last ball in the hat will be white for sure.
  • "BLACK" - if the last ball in the hat will be black for sure.
  • "UNKNOWN" - if you can't be sure of the last ball's color.

输入格式

The first line of the input file contains the number of cases, N(0 < N ≤ 1000) . N test cases follow.

Each case contains W and B(W + B > 0,0 ≤ W ≤ 109,0 ≤ B ≤ 109) on a line separated by a space.

输出格式

For each input case, you should output:

Case #X: Y

where X is the number of the test case and Y is either “WHITE”, “BLACK” or “UNKNOWN” as explained above. (quotes for clarity)

样例

Input
2
3 1
3 6
Output
Case #1: BLACK
Case #2: WHITE

16 人解决,19 人已尝试。

19 份提交通过,共有 32 份提交。

4.1 EMB 奖励。

创建: 15 年,9 月前.

修改: 7 年,4 月前.

最后提交: 4 年,1 月前.

来源: GCJ 2008

题目标签