Logo
(追記) (追記ここまで)

4141번 - Numbersrebmun 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB74335929347.258%

문제

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: 2: ABC, 3: DEF, 4: GHI, 5: JKL, 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ.)

입력

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 20 letters, which may be either uppercase or lowercase.

출력

For each company name, print a single line of output, containing the word YES if the phone number is a palindrome, or NO if it is not.

제한

예제 입력 1

2
ANBOBNA
iAmACoolCompany

예제 출력 1

YES
NO

힌트

출처

Contest > Waterloo's local Programming Contests > 2 October, 2011 D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /