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