Description

IS IT [Possible] TO C0NNECT A1L THE [O] WITHAUT GOING [Diagonally], [Repeating], [Skipping], GOING [Outside] THE GRID, OR [Touching] THE [X!?]

Input Format

4 3
O O O O
O O X O
O O O O

Output Format

Yeah

Sample Input 1

5 3
O X O O O
O O O O O
O O O O O

Sample Output 1

Nah

Sample Input 2

8 15
O O O O O X O O
O O O O O O O O
O O X O O O O O
O O O X X X O O
X X O O O O O O
X X X O O O O O
O O O O O O O O
O O O O X X O O
O O O O X X O O
X O O X X X O O
X O X X X X O O
X O X X X X X X
X O O O O O O O
X X X O O O X O
X X X O O O O O

Sample Output 2

Yeah

Sample Input 3

6 7
O O X X O O
O O X X O O
O X X X X O
O O O O O O
O X X X X O
O O X X O O
O O X X O O

Sample Output 3

Nah

Hints

WAIT... I CAn'T [Solve] IT EITHER!!!

Subtasks

No. Testdata Range Score

TopCoder

ๆ™ด
ไบบๅทฅๆฌ้‹้กŒ็›ฎๅคช็ดฏไบ†๏ผŒ้‚ฃๅฐฑๅฏซๅ€‹็ˆฌ่Ÿฒ็ˆฌ่‡ชๅทฑๅง

User's AC Ratio

100.0% (1/1)

Tags

Problem Source

MAYBE YOU WOULD [Like To] CHECK OUT THE [Ranklist]?

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536
1 1000 65536 65536
2 1000 65536 65536
3 1000 65536 65536
4 1000 65536 65536
5 1000 65536 65536
6 1000 65536 65536
7 1000 65536 65536
8 1000 65536 65536
9 1000 65536 65536