#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
char c;
while (cin >> c)
{
if (c != ' ')
s.push_back(c);
}
if (s.empty())
{
cout << "YES";
return 0;
}
bool palindrom = true;
for (int i = 0; i <= s.length()/2; i++)
{
if (s.at(i) != s.at(s.length()-1-i))
{
palindrom = false;
break;
}
}
cout << (palindrom ? "YES" : "NO");
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJc3RyaW5nIHM7CiAgICBjaGFyIGM7CiAgICB3aGlsZSAoY2luID4+IGMpCiAgICB7CiAgICAgICAgaWYgKGMgIT0gJyAnKSAKICAgICAgICAJcy5wdXNoX2JhY2soYyk7CiAgICB9CiAgICBpZiAocy5lbXB0eSgpKQogICAgewogICAgICAgIGNvdXQgPDwgIllFUyI7CiAgICAgICAgcmV0dXJuIDA7CiAgICB9CiAgICBib29sIHBhbGluZHJvbSA9IHRydWU7CiAgICBmb3IgKGludCBpID0gMDsgaSA8PSBzLmxlbmd0aCgpLzI7IGkrKykKICAgIHsKICAgICAgICBpZiAocy5hdChpKSAhPSBzLmF0KHMubGVuZ3RoKCktMS1pKSkKICAgICAgICB7CiAgICAgICAgICAgIHBhbGluZHJvbSA9IGZhbHNlOwogICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8IChwYWxpbmRyb20gPyAiWUVTIiA6ICJOTyIpOwoJcmV0dXJuIDA7Cn0=