Recently, a start up by two students of a state university of city F gained incredible popularity. Now it's time to start a new company. But what do we call it?

The market analysts came up with a very smart plan: the name of the company should be identical to its reflection in a mirror! In other words, if we write out the name of the company on a piece of paper in a line (horizontally, from left to right) with large English letters, then put this piece of paper in front of the mirror, then the reflection of the name in the mirror should perfectly match the line written on the piece of paper.

There are many suggestions for the company name, so coming up to the mirror with a piece of paper for each name wouldn't be sensible. The founders of the company decided to automatize this process. They asked you to write a program that can, given a word, determine whether the word is a 'mirror' word or not.


-----Input-----

The first line contains a non-empty name that needs to be checked. The name contains at most 10^5 large English letters. The name will be written with the next sans serif font: $\text{ABCDEFGHI JKLMNOPQRSTUVWXYZ}$


-----Output-----

Print 'YES' (without the quotes), if the given name matches its mirror reflection. Otherwise, print 'NO' (without the quotes).


-----Examples-----
Input
AHA

Output
YES

Input
Z

Output
NO

Input
XO

Output
NO

Difficulty: competition

Starter code:

Solutions:
s=input()
M={"A","H","I","M","O","T","U","V","W","X","Y"}
ans="YES"
n=len(s)
for i in range(len(s)//2):
    x=s[i]
    y=s[n-i-1]
    if(x!=y or x not in M):
        ans="NO"
        break
if(n%2==1):
    if(s[n//2] not in M):
        ans="NO"
print(ans)
    


a = input()
for i in range(len(a)):
	if a[i] != a[len(a) - i - 1] or a[i] not in ('A','H','I','M','O','T','U','V','W','X','Y'):
		print("NO")
		return
print("YES")

s=input()
z=['A','H','M','T','U','V','W','O','I','X','Y']

f1=True
if (s[::-1]==s):
    f1=True
else:
    f1=False


sa=set()
v=True
for i in range (0,len(s)):
    sa.add(s[i])

sals=list(sa)
for i in range (0,len(sals)):
    if (sals[i] in z):
        v=True
    else:
        v=False
        break

if (f1==True and v==True):
    print ("YES")
else:
    print ("NO")


l = ['A', 'H', 'I', 'M', 'O', 'T', 'U', 'V', 'W', 'X', 'Y']

s = input()

if s == s[::-1] and len(set(s) | set(l)) == len(l): print('YES')
else:print('NO')



good = set('AHIMOTUVWXY')

in_str = input("")

str_len = len(in_str)

result = ""

i = 0

while(i < str_len/2):
    if((in_str[i] in good) and (in_str[i] == in_str[-1-i])):
        i += 1
    else:
        result = "NO"
        break

if(result != "NO"):
    result = "YES"

print(result)
        


good = ['A', 'H', 'I', 'M', 'O', 'T', 'U', 'W', 'V', 'X', 'Y']
s = input().strip()
f = 1
for i in range(len(s)):
    if s[i] not in good:
        f = 0
if f and s == s[::-1]:
    print('YES')
else:
    print('NO')


p, t = 'AHIMOTUVWXY', input()
n = len(t) // 2
print('YES' if all(c in p for c in t) and (n < 1 or t[: n][:: -1] == t[-n :]) else 'NO')

import sys

def check(text):
    legal = 'AHIMOTUVWXY'
    for i in text:
        if i not in legal:
            return False
    rev = list(text)
    rev.reverse()
    if text != ''.join(rev):
        return False
    return True

def __starting_point():
    text = sys.stdin.readline().split()[0]
    if check(text):
        print('YES')
    else:
        print('NO')

__starting_point()

s = input()
if s == s[::-1] and not 'N' in s and not 'L' in s and not'G' in s and not 'F' in s and not 'R' in s and not 'S' in s and not 'C' in s and not 'Q' in s and not 'B' in s and not 'E' in s and not 'D' in s and not 'J' in s and not 'K' in s and not 'Z' in s and not 'P' in s:
    print('YES')
else:
    print('NO')

s = input().strip()
a = [0]*26
for i in range(len(s)):
    a[ord(s[i]) - ord('A')] += 1
if sum(a) - a[0] - a[7] - a[8] - a[12] - a[14] - a[19] - a[20] - a[21] - a[22] - a[23] - a[24] == 0 and s == ''.join(reversed(list(s))):
    print("YES")
else:
    print("NO")

x = input();
is_mirror="YES"
bad_list=["B","C","D","E","F","G","J","K","L","N","P","Q","R","S","Z"]
for letter in x:
    if letter in bad_list:
        is_mirror="NO"
        break
list=[]
if is_mirror=="YES":
    for letter in x:
        list.append(letter)
n=len(list)
for i in range(n-1):
    if list[i]!=list[n-1-i]:
        is_mirror="NO"
print(is_mirror)


s = input().strip()
fl = True
for i in s:
    if i not in 'AHIMOTUVWXY':
        fl = False
        break
if (s == s[::-1] and fl):
    print('YES')
else:
    print('NO')

def test_achiral(ch, achiral):
    for i in ch:
        if i in achiral:
            print("NO")
            return()
        
    ch1=""
    j=-1
    while j>=-len(ch):
        ch1=ch1+ch[j]
        j-=1
    if ch1==ch:
        print("YES")
        return()
    else:
        print("NO")
        return()
achiral="BCDEFGJKLNPQRSZ"
ch=input()
test_achiral(ch,achiral)


n=input()
i=0
k=len(n)-1
_b=True
while i<=k and _b:
	if n[i]==n[k] and n[i] in ['A','H','I','M','O','T','U','V','W','X','Y']:
		_b=True
		i+=1
		k-=1
	else:
		_b=False
if _b: print('YES')
else: print('NO')

def main():
    name = input()
    s = ('B', 'C', 'D', 'E', 'F', 'G', 'J', 'K', 'L', 'N', 'P', 'Q', 'R', 'S', 'Z')
    for ch in s:
        if ch in name:
            print('NO')
            return
    if name[:len(name) // 2] != name[::-1][:len(name) // 2]:
        print('NO')
        return
    print('YES')

main()


from sys import stdin

__author__ = 'artyom'

exclusions = 'BCDEFGJKLNPQRSZ'
st = stdin.readline().strip()
l = len(st)
p = l // 2
for i in range(l):
  if st[i] in exclusions or (i <= p and st[i] != st[l - i - 1]):
    print('NO')
    return

print('YES')


import sys
import math
  
st = sys.stdin.readline()
l = len(st) - 1

dct = {'A' : 1, 'B': 0, 'C': 0, 'D': 0, 'E': 0, 'F': 0, 'G': 0, 'H': 1, 'I': 1,
        'J': 0, 'K': 0, 'L': 0, 'M': 1, 'N': 0, 'O': 1, 'P': 0, 'Q': 0, 'R': 0, 'S': 0,
        'T': 1, 'U': 1, 'V': 1, 'W': 1, 'X': 1, 'Y': 1, 'Z': 0 }

if(l % 2 != 0):
    if(dct[st[int(l / 2)]] == 0):
        print("NO")
        return

j = l
for i in range(int(l / 2)):
    if(st[i] != st[j - 1] or dct[st[i]] == 0):
        print("NO")
        return
        
    j -= 1
        
print("YES")



def palindrome(n):
    for i in range(0,len(n)):
        if n[i] != n[-(i+1)]:
            return 0
    return 1

lessgo = ['a','h','i','m','o','t','u','v','w','x','y']
i = list(input())
for j in range(len(i)):
    i[j] = i[j].lower()

mir = 1
for j in range(len(i)):
    if i[j] not in lessgo:
        mir = 0
if palindrome(i) == 1 and mir == 1:
    print("YES")
else:
    print("NO")

word = list(input())
def poop(word):
    correct = ['A','H','I','M','O','T','U','V','W','X','Y']
    for i in word:
        if i not in correct:
            return "NO"
    if list(reversed(word)) == word:
        return "YES"
    return "NO"
print(poop(word)) 

import sys

def check(text):
    legal = 'AHIMOTUVWXY'
    for i in text:
        if i not in legal:
            return False
    rev = list(text)
    rev.reverse()
    if text != ''.join(rev):
        return False
    return True

def __starting_point():
    text = sys.stdin.readline().split()[0]
    if check(text):
        print('YES')
    else:
        print('NO')


__starting_point()

sl, s = 'AHIMOTUVWXY', input()
print('YES' if all(s[i] in sl and s[i] == s[len(s) - i - 1] for i in range(len(s))) else 'NO')

s = input()
k = 'AHIMOTUVWXY'
r = True
for c in s:
    r &= c in k
    if not r: break
if r and s == s[::-1]:
    print('YES')
else:
    print('NO')


def isMirror(s):
	x = s[::-1]
	if(x != s):
		return False
	n = s.count('A') + s.count('H') + s.count('I') + s.count('M') + s.count('O') + s.count('T') + s.count('U') + s.count('V') + s.count('W') + s.count('X') + s.count('Y')
	if(n != len(s)):
		return False
	return True	

s = input()

if(isMirror(s) == True):
	print('YES')
else:
	print('NO')

def main():
    s = input()
    print(("NO", "YES")[s == s[::-1] and all(c in "AHIMOTUVWXY" for c in s)])


def __starting_point():
    main()

__starting_point()

# Name : Sachdev Hitesh
# College : GLSICA

user = input()
resu = user[::-1]
s = len(user)
#print(s)
c = 0
if user == resu:
	for i in user:
		if i == 'A' or i == 'H' or i == 'I' or i == 'O' or i == 'T' or i == 'V' or \
		i == 'W' or i == 'X' or i == 'Y' or i == 'M' or i == 'U'  :
			c = c + 1
if c == s:
	print("YES")
else:
	print("NO")