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