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