#include <iostream>
#include <string>
using namespace std;
main()
{
string a;
cin>>a;
int i=0,j=a.size()-1,n=0;
// cout<<i<<" "<<j<<" "<<n<<endl;
while (a[i]==a[j])
{
// cout<<i<<" "<<j<<" "<<n<<endl;
n++;
i++;
j--;
if (n==a.size())
{
break;
}
}
//cout<<i<<" "<<j<<" "<<n<<endl;
if (n==a.size())
{
cout<<"yes";
}
else
{
cout<<"no";
}
}
#include
#include
using namespace std;
main()
{
string a;
cin>>a;
int i=0,j=a.size()-1,n=0;
// cout<<i<<" "<<j<<" "<<n<<endl;
while (a[i]==a[j])
{
// cout<<i<<" "<<j<<" "<<n<<endl;
n++;
i++;
j--;
if (n==a.size())
{
break;
}
}
//cout<<i<<" "<<j<<" "<<n<<endl;
if (n==a.size())
{
cout<<"yes";
}
else
{
cout<<"no";
}
}
while (cin >> a) {
...
}