#abc077a. [abc077_a]Rotation
[abc077_a]Rotation
Problem Statement
You are given a grid with rows and columns of squares. The color of the square at the -th row and -th column is represented by the character .
Write a program that prints YES
if this grid remains the same when rotated degrees, and prints NO
otherwise.
Constraints
- is a lowercase English letter.
Input
Input is given from Standard Input in the following format:
Output
Print YES
if this grid remains the same when rotated degrees; print NO
otherwise.
Sample Input 1
pot
top
Sample Output 1
YES
This grid remains the same when rotated degrees.
Sample Input 2
tab
bet
Sample Output 2
NO
This grid does not remain the same when rotated degrees.
Sample Input 3
eye
eel
Sample Output 3
NO