#include<iostream>
using namespace std;

int main()
{
	int a;

	while (true)
	{
		cin >> a;
		if (a == 0)
		{
			break;
		}
		if (a / 10000 != 0) 
		{
			if (a / 10000 == a % 10)
			{
				if ((a / 1000) % 10 == (a % 100) / 10)
				{
					cout << "yes" << "\n";
				}
				else
					cout << "no" << "\n";
			}
			else
				cout << "no" << "\n";
		}
		else if (a / 1000 != 0)
		{
			if (a / 1000 == a % 10)
			{
				if ((a / 100) / 10 == (a % 100) / 10)
				{
					cout << "yes" << "\n";
				}
				else
					cout << "no" << "\n";
			}
			else
				cout << "no" << "\n";
		}
		else if (a / 100 != 0)
		{
			if (a / 100 == a % 10)
			{
				cout << "yes" << "\n";
			}
			else
				cout << "no" << "\n";
		}
		else if (a / 10 != 0)
		{
			if (a / 10 == a % 10)
			{
				cout << "yes" << "\n";
			}
			else
				cout << "no" << "\n";
		}
		else
			cout << "yes" << "\n";
	}
	return 0;
}