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