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