#include<iostream>
using namespace std;
int main()
{
int i,i2,a,t=0;
char s[1000];
cin>>s;
for(i2=0; i2<1000; i2++)
{
if(int (s[i2])==0)
{
break;
}
}i2=i2-1;
a=i2;
for(i=0; i<=i2; i++)
{
if(char(s[i])==char(s[a]))
{
t++;
}
a--;
}
if(i2%2==0)
cout<<"NO";
else if(t==(i2+1))
{
cout<<"YES"<<endl;
for(i=0; i<=((i2+1)/2-1); i++)cout<<s[i];
}
else cout<<"NO";
}