重叠的正方形 Overlapping Squares

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=243&page=show_problem&problem=3265 [PDF](https://uva.onlinejudge.org/external/121/p12113.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12113/db8d1a359536e735ded927f037557a521dffc4b8.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12113/93e60ccac150dcf7e8ba2f7b13182db4d4c341ec.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12113/7546f31b5160d5564a7007117aafe3991a0e4155.png)

输入输出样例

输入样例 #1

#
___ #
| |_ _| #
|_| | #
|_ _| #
#
__ #
| |#
|_ _| #
#
_ _ _ _ #
|_|_|_|_|#
|_|_|_|_|#
|_|_|_|_|#
|_|_|_|_|#
__ #
_| |_ #
| |_ _| |#
|_| |_|#
|_ _|_|#
0

输出样例 #1

Case 1: Yes
Case 2: Yes
Case 3: No
Case 4: Yes