#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
	cin>>n;
	if (n%10==n/1000){
		if (n/10%10==n/100%10){
			cout<<"yes";
		}
			
	}else{
		cout<<"no";
	}
		
	
	
		
	return 0;
}

/**************************************************************
	Problem: 1647
	User: lvrenxiang
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/