TWOBISOP - TWO BISHOPS

no tags 

You are given a chess board of order 8x8 with exactly 2 bishops placed on it. Print "Yes" if they can attack each other during the first move of one of the bishops; "No" otherwise.


Input:

The first line consists of an integer t(1<=t<=1000), the number of testcases. For each test case,  you will be given the description of the board with 8 strings(8 characters in each string).  'B' denotes a cell with a bishop and '.' denotes an empty cell. There is an empty line after every test case.
 

Output:

For each test case print "Yes" or "No" (case sensitive).

Sample Input:

2

.......B

........

........

....B...

........

........

........

........


........

........

........

.B...B..

........

........

........

........


Sample Output:

Yes

No


hide comments
biswajitk123: 2018-01-12 15:11:50

poor format of input very poor :(

kanishkajoshi: 2016-06-18 13:04:48

ac in one go :)

kapti: 2015-04-22 16:35:54

test cases anyone ???

Archangel: 2015-04-03 23:50:25

very poor format of input :/

Rahul Lingala: 2014-12-11 17:33:05

Should we check whether they will attack each other only for the first step or forever?

Result : Understood after looking at the test cases.

Last edit: 2014-12-11 17:34:14

Added by:cegprakash
Date:2013-02-24
Time limit:2s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: BF