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