// editor1
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
    string words,other;
    int numbers;
    getline(cin,words);
    cin>>numbers;
    reverse(words.begin(),words.end());
    
    if(words==words)
    {
        cout<<"YES";
    }
    if else(words!=words)
    {
        cout<<"NO";
    }
    else
    {
        cout<<"INVALID INPUT";
    }
    
}