#include <bits/stdc++.h>   using namespace std;   int main() {     string str;     cin >> str;     int ans(0);     for (int i = 0; i < str.size(); ++i)       if (str[i] != str[str.size() - 1 - i]) ++ans;     if (ans == 2 || (ans == 0 && str.size() % 2 == 1))       cout <<  YES  << endl;     else       cout <<  NO  << endl;     return 0;   }   