P11033 [MX-X3-T0] "RiOI-4" Bingo Game.

Background

Original problem link: . --- The Fifth City. The Fifth Sound. In a world where “five” seems to be everywhere. If we can once again connect the five people, whose timelines are in chaos, into one line— Then it will be a ray of sunlight, a way to lead ourselves out of the darkness. ![](https://cdn.luogu.com.cn/upload/image_hosting/wi8fqmqx.png) (Image from [Delusion: Deliver Me](https://store.steampowered.com/app/779640/Deliver_Me/), please contact for removal if it infringes.)

Description

There is a $5$ by $5$ board. Each of the $25$ cells may or may not contain a piece. There are $12$ lines as shown on the left of the figure below. We call a board **Bingo** if and only if **at least** one line has a piece in every cell on that line. Determine whether the given board is Bingo. Some examples are shown on the right of the figure below. (Dark means there is a piece, light means there is no piece.) ![](https://cdn.luogu.com.cn/upload/image_hosting/no9qur52.png) You can go to [this link](https://www.desmos.com/calculator/zq45krhafo?lang=zh-CN) to test different cases by yourself.

Input Format

There are $5$ lines, each with $5$ numbers. If there is a piece at row $i$, column $j$, then the $j$-th number on line $i$ is $1$; otherwise it is $0$.

Output Format

If there is at least one line containing $5$ pieces, output `Yes`; otherwise output `No`.

Explanation/Hint

**Sample Explanation #1** The board in this sample is the one at the top-left in the figure, and it is not Bingo. **Sample Explanation #3** The board in this sample is the one at the bottom-left in the figure, and it is Bingo. **Constraints** For $100\%$ of the testdata, all input numbers are guaranteed to be $0$ or $1$. Translated by ChatGPT 5