eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Numbersrebmun

Numbersrebmun

\includegraphics{https://static.e-olymp.com/content/6a/6a89e800a5e0fed694226638d9db3529d69e5044.jpg} Anna and Bob are starting up a new high-tech company. Of course, one of their key considerations is choosing a good name for the company. Palindromes are cool. (A palindrome is a word that is the same when reversed, like the names of our two entrepreneurs.) They would really the name of their company to be a palindrome. Unfortunately, they cannot think of a nifty company name that is also a palindrome. Maybe at least the telephone number of their company could be a palindrome. However, they really want their customers to be able to call them, so they want to choose the company name so that, when it is typed using the letters printed on a phone keypad, the result is also their phone number. (On a standard phone keypad, the following keys contain the corresponding letters: \textbf{2}: \textbf{ABC}, \textbf{3}: \textbf{DEF}, \textbf{4}: \textbf{GHI}, \textbf{5}: \textbf{JKL}, \textbf{6}: \textbf{MNO}, \textbf{7}: \textbf{PQRS}, \textbf{8}: \textbf{TUV}, \textbf{9}: \textbf{WXYZ}.) \InputFile The first line of input contains a single integer, the number of lines to follow. Each following line contains a company name, which is a string of at most \textbf{20} letters, which may be either uppercase or lowercase. \OutputFile For each company name, print a single line of output, containing the word \textbf{YES} if the phone number is a palindrome, or \textbf{NO} if it is not.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
2
ANBOBNA
iAmACoolCompany
Вихідні дані #1
YES
NO