print yes
题号:NC252108
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Christina wants to write a program to automatically classify and recognize these letters, but unfortunately she doesn't know how to code. Can you help her out? 

Y, E, and S are all composed of images of 7*9 pixels under normal circumstances. However, the actual images may be rotated clockwise by 90°, 180°, or 270°. They may also be stretched horizontally (enlarged) or vertically (enlarged), or stretched horizontally and vertically at the same time, but the number of pixels in the final enlarged image will not exceed one million. The following images are the normal images of Y, E, and S, as well as three rotated images of Y and three stretched images of E.


输入描述:

Enter a 2D 01 matrix, input one string per row, and continue to input until the end of the file. 1 represents the gray pixels in the above figure, and 0 represents the green pixels in the above figure. What you need to determine is what letter the 1s in the input matrix form. The input ensures that the number of character matrix pixels is less than 10^6 (i.e., the total number of characters input), and the input ensures that the character matrix is valid and solvable.

输出描述:

Output one of the letters Y, E, or S to represent the result.
示例1

输入

复制
000000000000000000000000000
000111111000000000000000000
000000000111000000000000000
000000000000111111111111000
000000000111000000000000000
000111111000000000000000000
000000000000000000000000000

输出

复制
Y