#include <cstdio>
#include <cstring>
#include <iostream>

#define N 100000
using namespace std;

int main(){
    bool a[91];
    memset(a, false, sizeof a);
    a[65] = true;
    a[72] = true;
    a[73] = true;
    a[77] = true;
    a[79] = true;
    a[84] = true;
    a[85] = true;
    a[86] = true;
    a[87] = true;
    a[88] = true;
    a[89] = true;

    char s[N];
    scanf("%s", &s);
    int len = strlen(s);
    bool isMirror = true;
    for(int i = 0; i < len / 2 + 1; i ++){
        if(s[i] != s[len - i - 1] || a[s[i]] == false){
            isMirror = false;
            break;
        }
    }

    if(isMirror == true){
        printf("YES");
    }else{
        printf("NO");
    }
}


#include <cstdio>
#include <cstring>
#include <iostream>

#define N 100000
using namespace std;

int main(){
    bool a[90];
    memset(a, false, sizeof a);
    a[65] = true;
    a[72] = true;
    a[73] = true;
    a[77] = true;
    a[79] = true;
    a[84] = true;
    a[85] = true;
    a[86] = true;
    a[87] = true;
    a[88] = true;
    a[89] = true;

    char s[N];
    scanf("%s", &s);
    int len = strlen(s);
    bool isMirror = true;
    for(int i = 0; i < len / 2 + 1; i ++){
        if(s[i] != s[len - i - 1] || s[a[i]] == false){
            isMirror = false;
            break;
        }
    }

    if(isMirror == true){
        printf("YES");
    }else{
        printf("NO");
    }
}


/*********************************
 *  Author: Tam Chi Tran         *
 *  Created: 23:30:00 05/10/2014 *
 *********************************/
#include <cstdio>
#include <cstring>
#include <cmath>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
#include <utility>
#include <string>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef set<int> si;
typedef list<int> li;
typedef map<string, int> msi;
typedef map<string, string> mss;

#define REP(i, a, b) \
    for(int i = (a); i < (b); i++)
#define REPD(i, a, b) \
    for(int i = (a); i <= (b); i++)
#define _REP(i, a, b) \
    for(int i = (a); i >= (b); i--)
#define _REPD(i, a, b) \
    for(int i = (a); i >= (b); i--)
#define TRvi(c, it) \
    for(vi::iterator it = (c).begin(); it != (c).end(); it ++)
#define TRvii(c, it) \
    for(vii:iterator it = (c).begin(); it != (c).end(); it++)
#define PI \
    acos(-1)
#define sqr(x) \
    ((x) * (x))
#define PRINTLN(a, n) \
    for(int i = 0; i < (n) ; i++){ \
        printf("%d", a[i]); \
    }\
    printf("\n");
#define RESET(a, k) memset(a, (k), sizeof a)
#define ASSIGN(a, b) a = b;
#define SWAP(a, b) \
    a = a + b; \
    b = a - b; \
    a = a - b;
int main(){
    char s[100001];
    int a[100];
    RESET(a, 0);
    a[65] = 1;
    a[72] = 1;
    a[73] = 1;
    a[77] = 1;
    a[79] = 1;
    a[84] = 1;
    a[85] = 1;
    a[86] = 1;
    a[87] = 1;
    a[88] = 1;
    a[89] = 1;
    gets(s);
    int len = strlen(s);
    bool isMirrorWord = true;
    REP(i, 0, len / 2 + 1){
        if(s[i] != s[len - i - 1] || a[s[i]] == 0){
            isMirrorWord = false;
            break;
        }
    }

    if(isMirrorWord){
        printf("YES");
    }else{
        printf("NO");
    }
}


#include <cstdio>
#include <cstring>
#include <iostream>

#define N 100000
using namespace std;

int main(){
    bool a[90];
    memset(a, false, sizeof a);
    a[65] = true;
    a[72] = true;
    a[73] = true;
    a[77] = true;
    a[79] = true;
    a[84] = true;
    a[85] = true;
    a[86] = true;
    a[87] = true;
    a[88] = true;
    a[89] = true;

    char s[N];
    scanf("%s", &s);
    int len = strlen(s);
    bool isMirror = true;
    for(int i = 0; i < len / 2 + 1; i ++){
        if(s[i] != s[len - i - 1] || a[s[i]] == false){
            isMirror = false;
            break;
        }
    }

    if(isMirror == true){
        printf("YES");
    }else{
        printf("NO");
    }
}


#include <bits/stdc++.h>
#define sz size()
using namespace std;

int main()
{
    int j;
    string s, s1;
    bool flag = 0;
    char arr[11] = {'A' , 'H', 'I' , 'M', 'O' , 'T' , 'W' , 'V' , 'X' , 'Y' , 'U' };
    while(cin >> s)
    {
        s1 = s;
        for (int x = 0; x < s.sz; x++)
        {
            flag = 0;
            for (int y = 0; y < 11 ;y++)
            {
                if (s[x] == arr[y])
                    {flag = 1 ; break;}
            }
            if (flag == 0)
                {cout << "NO";
                return 0;}
        }
        reverse(s.begin() , s.end());
        s == s1 ? cout << "YES" : cout << "NO";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int j;
    string s;
    while(cin >> s)
    {
    if (s.size()%2 == 0 || s.size() == 1)
    {
        cout << "NO";
        return 0;
    }
    j=s.size();
    for (int i=0; i<s.size()/2+1; ++i)
    {
        j--;
        if (s[i]!=s[j])
        {
            cout << "NO";
            return 0;
        }
    }
    cout << "YES" << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int j;
    string s;
    while(cin >> s)
    {
    if ( s.size() == 1)
    {
        cout << "NO";
        return 0;
    }
    j=s.size();
    for (int i=0; i<s.size()/2; ++i)
    {
        j--;
        if (s[i]!=s[j])
        {
            cout << "NO";
            return 0;
        }
    }
    cout << "YES" << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int j;
    string s;
    while(cin >> s)
    {
    if (s.size()%2 == 0)
    {
        cout << "NO";
        return 0;
    }
    j=s.size();
    for (int i=0; i<s.size()/2+1; ++i)
    {
        j--;
        if (s[i]!=s[j])
        {
            cout << "NO";
            return 0;
        }
    }
    cout << "YES" << endl;
    }
    return 0;
}


// Codeforces - Problem 424B
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

// DEFINE
#define FOR(i,a,b)     for (int i=(a),_b=(b); i<_b; i++)
#define RFOR(i,b,a)    for (int i=(b)-1,_a=(a); i>=_a; i--)
#define RESET(a,b)      memset((a),(b),sizeof(a))
#define fi              first
#define se              second
#define foreach(i, c)   for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

//
using namespace std;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <string> vs;
typedef long long int64; //NOTES:int64
typedef unsigned long long uint64; //NOTES:uint64
typedef unsigned uint;
const double pi = acos(-1.0); //NOTES:pi
const double eps = 1e-11; //NOTES:eps
const int MAXI = 0x7fffffff;
int in() {
    int x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}
// CODE
int apples[101];
int main(int argc, char *argv[])
{
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    string s;
    int n;
    cin >> s;
    //cout << s.find_first_not_of("ABHIMOTUVWXY") << endl;
    if(s.find_first_not_of("ABHIMOTUVWXY") >= 0)
    {
        cout << "NO";
        return 0;
    }
    n = s.size();
    FOR(i, 0, n/2)
        if(s[i] != s[n-i-1])
        {
            cout << "NO";
            return 0;
        }
    cout << "YES";
    return 0;
}


// Codeforces - Problem 424B
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

// DEFINE
#define FOR(i,a,b)     for (int i=(a),_b=(b); i<_b; i++)
#define RFOR(i,b,a)    for (int i=(b)-1,_a=(a); i>=_a; i--)
#define RESET(a,b)      memset((a),(b),sizeof(a))
#define fi              first
#define se              second
#define foreach(i, c)   for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

//
using namespace std;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <string> vs;
typedef long long int64; //NOTES:int64
typedef unsigned long long uint64; //NOTES:uint64
typedef unsigned uint;
const double pi = acos(-1.0); //NOTES:pi
const double eps = 1e-11; //NOTES:eps
const int MAXI = 0x7fffffff;
int in() {
    int x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}
// CODE
int apples[101];
int main(int argc, char *argv[])
{
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    string s;
    int n;
    cin >> s;
    n = s.find_first_not_of("ABHIMOTUVWXY");
    if(n >= 0 && n <= 4294967295)
    {
        cout << "NO";
        return 0;
    }
    n = s.size();
    FOR(i, 0, n/2)
        if(s[i] != s[n-i-1])
        {
            cout << "NO";
            return 0;
        }
    cout << "YES";
    return 0;
}


// Codeforces - Problem 424B
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

// DEFINE
#define FOR(i,a,b)     for (int i=(a),_b=(b); i<_b; i++)
#define RFOR(i,b,a)    for (int i=(b)-1,_a=(a); i>=_a; i--)
#define RESET(a,b)      memset((a),(b),sizeof(a))
#define fi              first
#define se              second
#define foreach(i, c)   for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

//
using namespace std;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <string> vs;
typedef long long int64; //NOTES:int64
typedef unsigned long long uint64; //NOTES:uint64
typedef unsigned uint;
const double pi = acos(-1.0); //NOTES:pi
const double eps = 1e-11; //NOTES:eps
const int MAXI = 0x7fffffff;
int in() {
    int x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}
// CODE
int apples[101];
int main(int argc, char *argv[])
{
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    string s;
    int n;
    cin >> s;
    if(s.find_first_not_of("ABHIMOTUVWXY") != string::npos)
    {
        cout << "NO";
        return 0;
    }
    n = s.size();
    FOR(i, 0, n/2)
        if(s[i] != s[n-i-1])
        {
            cout << "NO";
            return 0;
        }
    cout << "YES";
    return 0;
}


// Codeforces - Problem 424B
#include <set>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <cassert>
#include <vector>
#include <list>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>

// DEFINE
#define FOR(i,a,b)     for (int i=(a),_b=(b); i<_b; i++)
#define RFOR(i,b,a)    for (int i=(b)-1,_a=(a); i>=_a; i--)
#define RESET(a,b)      memset((a),(b),sizeof(a))
#define fi              first
#define se              second
#define foreach(i, c)   for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)

//
using namespace std;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef pair <int, int> ii;
typedef vector <ii> vii;
typedef vector <string> vs;
typedef long long int64; //NOTES:int64
typedef unsigned long long uint64; //NOTES:uint64
typedef unsigned uint;
const double pi = acos(-1.0); //NOTES:pi
const double eps = 1e-11; //NOTES:eps
const int MAXI = 0x7fffffff;
int in() {
    int x = 0, c;
    for (; (uint)((c = getchar()) - '0') >= 10; ) { if (c == '-') return -in(); if (!~c) throw ~0; }
    do { x = (x << 3) + (x << 1) + (c - '0'); } while ((uint)((c = getchar()) - '0') < 10);
    return x;
}
// CODE
int apples[101];
int main(int argc, char *argv[])
{
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    string s;
    int n;
    cin >> s;
    n = s.find_first_not_of("AHIMOTUVWXY");
    if(n >= 0 && n <= 4294967295)
    {
        cout << "NO";
        return 0;
    }
    n = s.size();
    FOR(i, 0, n/2)
        if(s[i] != s[n-i-1])
        {
            cout << "NO";
            return 0;
        }
    cout << "YES";
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<string.h>
int main()
{
    int middle,len,end,i,k;
    char arr[1000001];
        scanf("%s",arr);
        len=strlen(arr);
         for(i=0;i<len;i++)
{
if((arr[i]=='A'||arr[i]=='H'||arr[i]=='I'||arr[i]=='M'||arr[i]=='O'||arr[i]=='T'||arr[i]=='U'||arr[i]=='V'||arr[i]=='W'||arr[i]=='X'))
{
k=0;
}
else{k=1;break;}
}
    if(k==0){
        if(len==1)
            printf("YES\n");
        else if(len==2)
        {
            if(arr[0]==arr[1])
                printf("YES\n");
            else
                printf("NO\n");
        }
        else
        {
            if(len%2==0)
            {
                middle=len/2-1;
                end=len-1;
                for(i=0;i<=middle;i++)
                {
                    if(arr[i]==arr[end])
                        end=end-1;
                    else{
                        printf("NO\n");
                        break;
                    }
                }
                if(i==middle+1)
                    printf("YES\n");
            }
            else
            {
                middle=len/2;
                end=len-1;
                for(i=0;i<middle;i++)
                {
                    if(arr[i]==arr[end])
                        end=end-1;
                    else
                    {
                        printf("NO\n");
                        break;
                    }
                }
                if(i==middle)
                    printf("YES\n");
            }
        }
    }
        else{printf("NO\n");}

    return 0;
}


#include <iostream>
#include<string>
using namespace std;

int main() {
    // your code goes here
    string s;
    cin>>s;
    int i,j,k,m=s.size()/2;
    for(i=0;i<s.size();i++)
     {
        if((s[i]=='A'||s[i]=='H'||s[i]=='I'||s[i]=='M'||s[i]=='O'||s[i]=='T'||s[i]=='U'||s[i]=='V'||s[i]=='W'||s[i]=='X'))
         {
            k=0;
         }
        else{k=1;break;}
     }
     if(k==0) {for(i=0,j=s.size()-1;i<s.size()&&j>=0;i++,j--){if(s[i]==s[j]){k=1;}else{k=0;break;}}}
     if(k==1){cout<<"YES"<<endl;}
     else{cout<<"NO"<<endl;}
    return 0;
}


    #include <iostream>
    #include<string>
    using namespace std;

    int main() {
    // your code goes here
    string s;
    cin>>s;
    int i,j,k;
    for(i=0;i<s.size();i++)
    {
    if((s[i]=='A'||s[i]=='H'||s[i]=='I'||s[i]=='M'||s[i]=='O'||s[i]=='T'||s[i]=='U'||s[i]=='V'||s[i]=='W'||s[i]=='X'))
    {
    k=0;
    }
    else{k=1;break;}
    }
    int m=0;
    if(k==0) {for(i=0,j=s.size()-1;i<s.size()&&j>=0;i++,j--){if(s[i]==s[j]){m=1;}else{m=0;break;}}}
    if(m==1){cout<<"YES"<<endl;}
    else{cout<<"NO"<<endl;}
    return 0;
    }


#include <iostream>
#include<string>
using namespace std;

int main() {
    // your code goes here
    string s;
    cin>>s;
    int i,j,k,m=s.size()/2;
    for(i=0,j=s.size()-1;i<m||i==0;i++,j--)
     {
        if(s[i]==s[j]&&(s[i]=='A'||s[i]=='H'||s[i]=='I'||s[i]=='M'||s[i]=='O'||s[i]=='T'||s[i]=='U'||s[i]=='V'||s[i]=='W'||s[i]=='X'))
         {
            k=0;
         }
        else{k=1;break;}
     }
     if(k==0) {cout<<"YES"<<endl;}
     else{cout<<"NO"<<endl;}
    return 0;
}


#include <iostream>
#include<string>
using namespace std;

int main() {
    // your code goes here
    string s;
    cin>>s;
    int i,j,k;
    for(i=0;i<s.size();i++)
     {
        if((s[i]=='Y'||s[i]=='A'||s[i]=='H'||s[i]=='I'||s[i]=='M'||s[i]=='O'||s[i]=='T'||s[i]=='U'||s[i]=='V'||s[i]=='W'||s[i]=='X'))
         {
            k=0;
         }
        else{k=1;break;}
     }
     int m=0;
     if(k==0) {for(i=0,j=s.size()-1;i<s.size()&&j>=0;i++,j--){if(s[i]==s[j]){m=1;}else{m=0;break;}}}
     if(m==1){cout<<"YES"<<endl;}
     else{cout<<"NO"<<endl;}
    return 0;
}


#include<iostream>
#include<stdio.h>
#include<string.h>
int main()
{
    int t,middle,len,end,i;
    char arr[1000001];
        scanf("%s",arr);
        len=strlen(arr);
        if(len==1)
            printf("YES\n");
        else if(len==2)
        {
            if(arr[0]==arr[1])
                printf("YES\n");
            else
                printf("NO\n");
        }
        else
        {
            if(len%2==0)
            {
                middle=len/2-1;
                end=len-1;
                for(i=0;i<=middle;i++)
                {
                    if(arr[i]==arr[end])
                        end=end-1;
                    else{
                        printf("NO\n");
                        break;
                    }
                }
                if(i==middle+1)
                    printf("YES\n");
            }
            else
            {
                middle=len/2;
                end=len-1;
                for(i=0;i<middle;i++)
                {
                    if(arr[i]==arr[end])
                        end=end-1;
                    else
                    {
                        printf("NO\n");
                        break;
                    }
                }
                if(i==middle)
                    printf("YES\n");
            }

    }
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <functional>
#include <limits.h>
#include <math.h>
#include <cstring>
#include <cstdio>
#include <stack>
using namespace std;
bool check(string s)
{
    for(int i=0;i<s.size();i++)
        if(s[i]=='B'||s[i]=='C'||s[i]=='D'||s[i]=='E'||s[i]=='F'||s[i]=='G'||s[i]=='J'||s[i]=='K'||s[i]=='L'||s[i]=='N'||s[i]=='P'||s[i]=='Q'||s[i]=='R'||s[i]=='S'||s[i]=='Z')
        return false;
    return true;
}
int main()
{
   string s;
   cin>>s;
   if(!check(s))cout<<"NO"<<endl;
   else{

   if(s.size()%2!=0)
   {
       string s1=s.substr(0,(s.size()-1)/2);cout<<s1<<endl;
       string s2=s.substr((s.size()-1)/2+1,(s.size()-1)/2);
       for(int i=0;i<s2.size()/2;i++)
       {
           char temp=s2[i];
           s2[i]=s2[s2.size()-1-i];
           s2[s2.size()-1-i]=temp;
       }
       if(s1==s2)cout<<"YES"<<endl;
       else cout<<"NO"<<endl;
   }
   else
   {
       string s1=s.substr(0,s.size()/2);
       string s2=s.substr(s.size()/2,s.size()/2);
        for(int i=0;i<s2.size()/2;i++)
       {
           char temp=s2[i];
           s2[i]=s2[s2.size()-1-i];
           s2[s2.size()-1-i]=temp;
       }
        if(s1==s2)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
   }
        }
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <functional>
#include <limits.h>
#include <math.h>
#include <cstring>
#include <cstdio>
#include <stack>
using namespace std;
bool check(string s)
{
    for(int i=0;i<s.size();i++)
        if(s[i]=='B'||s[i]=='C'||s[i]=='D'||s[i]=='E'||s[i]=='F'||s[i]=='G'||s[i]=='J'||s[i]=='K'||s[i]=='L'||s[i]=='P'||s[i]=='Q'||s[i]=='R'||s[i]=='S'||s[i]=='Z')
        return false;
    return true;
}
int main()
{
   string s;
   cin>>s;
   if(!check(s))cout<<"NO"<<endl;
   else{

   if(s.size()%2!=0)
   {
       string s1=s.substr(0,(s.size()-1)/2);
       string s2=s.substr((s.size()-1)/2+1,(s.size()-1)/2);
       if(s1==s2)cout<<"YES"<<endl;
       else cout<<"NO"<<endl;
   }
   else
   {
       string s1=s.substr(0,s.size()/2);
       string s2=s.substr(s.size()/2,s.size()/2);
        if(s1==s2)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
   }
        }
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <functional>
#include <limits.h>
#include <math.h>
#include <cstring>
#include <cstdio>
#include <stack>
using namespace std;
bool check(string s)
{
    for(int i=0;i<s.size();i++)
        if(s[i]=='B'||s[i]=='C'||s[i]=='D'||s[i]=='E'||s[i]=='F'||s[i]=='G'||s[i]=='J'||s[i]=='K'||s[i]=='L'||s[i]=='N'||s[i]=='P'||s[i]=='Q'||s[i]=='R'||s[i]=='S'||s[i]=='Z')
        return false;
    return true;
}
int main()
{
   string s;
   cin>>s;
   if(!check(s))cout<<"NO"<<endl;
   else{

   if(s.size()%2!=0)
   {
       string s1=s.substr(0,(s.size()-1)/2);
       string s2=s.substr((s.size()-1)/2+1,(s.size()-1)/2);
       for(int i=0;i<s2.size()/2;i++)
       {
           char temp=s2[i];
           s2[i]=s2[s2.size()-1-i];
           s2[s2.size()-1-i]=temp;
       }
       if(s1==s2)cout<<"YES"<<endl;
       else cout<<"NO"<<endl;
   }
   else
   {
       string s1=s.substr(0,s.size()/2);
       string s2=s.substr(s.size()/2,s.size()/2);
        for(int i=0;i<s2.size()/2;i++)
       {
           char temp=s2[i];
           s2[i]=s2[s2.size()-1-i];
           s2[s2.size()-1-i]=temp;
       }
        if(s1==s2)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
   }
        }
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include <queue>
#include <functional>
#include <limits.h>
#include <math.h>
#include <cstring>
#include <cstdio>
#include <stack>
using namespace std;

int main()
{
   string s;
   cin>>s;
   if(s.size()==1)cout<<"NO"<<endl;
   else if(s.size()%2!=0)
   {
       string s1=s.substr(0,(s.size()-1)/2);
       string s2=s.substr((s.size()-1)/2+1,(s.size()-1)/2);
       if(s1==s2)cout<<"YES"<<endl;
       else cout<<"NO"<<endl;
   }
   else
   {
       string s1=s.substr(0,s.size()/2);
       string s2=s.substr(s.size()/2,s.size()/2);
        if(s1==s2)cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
   }
}


#include<iostream>
#include<string>
using namespace std;
char c[12]={'9','A','H','I','O','P','U','V','W','X','Y'};string s;
int main()
{
    cin>>s;
    for(int i=0;i<int(s.size())/2;i++)
    {
            if(s[i]!=s[int(s.size())-i-1])
            {cout<<"NO";return 0;}int j=1;
            for(j=1;j<=11;j++)
            {if(c[j]==s[j])break;}
            if(j>11){cout<<"NO";return 0;}
    }
    if(int(s.size())%2)
    {
            int j=1;
            for(j=1;j<=11;j++)
            {if(c[j]==s[int(s.size())/2])break;}
            if(j>11){cout<<"NO";return 0;}
    }
    cout<<"YES";
    return 0;
}


#include<iostream>
#include<string>
using namespace std;
char c[12]={'9','A','H','I','M','O','T','U','V','W','X','Y'};string s;
int main()
{
    cin>>s;
    for(int i=0;i<int(s.size())/2;i++)
    {
            if(s[i]!=s[int(s.size())-i-1])
            {cout<<"NO";return 0;}int j=1;
            for(j=1;j<=11;j++)
            {if(c[j]==s[i])break;}
            if(j>11){cout<<"NO";return 0;}
    }
    if(int(s.size())%2)
    {
            int j=1;
            for(j=1;j<=11;j++)
            {if(c[j]==s[int(s.size())/2])break;}
            if(j>11){cout<<"NO";return 0;}
    }
    cout<<"YES";
    return 0;
}


#include<iostream>
#include<string>
using namespace std;
char c[12]={'9','A','H','I','O','P','U','V','W','X','Y'};string s;
int main()
{
    cin>>s;
    for(int i=0;i<int(s.size())/2;i++)
    {
            if(s[i]!=s[int(s.size())-i-1])
            {cout<<"NO";return 0;}int j=1;
            for(j=1;j<=11;j++)
            {if(c[j]==s[i])break;}
            if(j>11){cout<<"NO";return 0;}
    }
    if(int(s.size())%2)
    {
            int j=1;
            for(j=1;j<=11;j++)
            {if(c[j]==s[int(s.size())/2])break;}
            if(j>11){cout<<"NO";return 0;}
    }
    cout<<"YES";
    return 0;
}