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