document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. string str;
  9. while(cin>>str)
  10. {
  11. //getline(cin,str);
  12. string::iterator it;
  13. string::reverse_iterator rit;
  14. bool isReversed=true;
  15. for ( it=str.begin() , rit=str.rbegin() ; rit < str.rend() && it<str.end(); it++ , rit++ )
  16. {
  17. while(!isalpha(*it))
  18. {
  19. it++;
  20. }
  21. while(!isalpha(*rit))
  22. {
  23. rit++;
  24. }
  25.  
  26. if(tolower(*it)!=tolower(*rit))
  27. {
  28. isReversed=false;
  29. break;
  30. }
  31.  
  32. }
  33.  
  34. if(isReversed)
  35. {
  36. cout<<"yes"<<endl;
  37. }
  38. else
  39. {
  40. cout<<"no"<<endl;
  41. }
  42. }
  43. return 0;
  44. }
');